1 2009-03-25 Darin Adler <darin@apple.com>
3 Reviewed by John Sullivan.
5 Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
6 they are being used only for selections, not an entire document.
8 * WebCore.base.exp: Remove exported function that's not used in WebKit.
10 * loader/archive/cf/LegacyWebArchive.cpp:
11 (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
12 function so it can share private things with other member functions. Added some FIXME
13 comments to a branch of code I think is dead. Changed boolean argument into a named
14 one. Renamed to match other similar functions.
15 (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
16 (WebCore::LegacyWebArchive::createResource): Ditto.
17 (WebCore::LegacyWebArchive::create): Merged the create and init functions.
18 (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
19 we should never fail to write (we can fail to read).
20 (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
21 member function as above.
22 (WebCore::LegacyWebArchive::createFromSelection): Ditto.
23 (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
24 iterators. Only include the favicon if the first node is the document since we don't
25 want to include the favicon when copying and pasting.
27 * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
28 Made the Mac-specific functions be static member functions. Made other helpers be
29 static member functions. Removed the nit function.
31 * loader/archive/cf/LegacyWebArchiveMac.mm:
32 (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
33 comment and made this a static member function.
34 (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
35 it so we only type cast in one place.
37 2009-03-25 Darin Adler <darin@apple.com>
39 Reviewed by David Hyatt.
41 Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none
42 https://bugs.webkit.org/show_bug.cgi?id=24740
43 rdar://problem/6679873
45 Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly
46 https://bugs.webkit.org/show_bug.cgi?id=12104
48 Test: media/video-display-none-crash.html
50 The problem here was that RenderSlider was trying to position its thumb in a way that
51 requires it to call updateLayout inside rendering code. The right way to position a
52 child renderer is to do layout, so I had to write a layout function. And then fix a few
53 other small problems shown by the same test case.
55 * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage.
56 Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
57 prefix for public DOM classes, not elements used as implementation details.
58 Made SliderThumbElement function members private and got rid of unneeded default
59 argument value for shadowParent.
60 (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes.
61 (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above.
62 (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in
63 a way that clamps to the range.
64 (WebCore::sliderPosition): Added. Computes the slider position: a double.
65 (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit
66 initialization of m_initialClickPoint.
67 (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead
68 of calling setCurrentPosition and valueChanged.
69 (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb.
70 (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle.
71 (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code
72 setting the position to relative and setting the left and top. We now handle positioning
73 in a custom layout function.
74 (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout.
75 (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value
76 in the element if it's out of range. This clamping used to be done as a side effect of
77 setPositionFromValue. Also, this has nothing to do with the renderer, so at some point
78 it could be moved into HTMLInputElement. Removed call to setPositionFromValue
79 and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be
80 a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want
81 this to be propagated to the parent -- it's not called during layout.
82 (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange
83 class. Also don't call setCurrentPosition; instead just call setNeedsLayout.
84 (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather
85 than the style to find the position; that means this needs to be done after layout is done.
86 Also removed unneeded runtime checks and replaced them with assertions, after checking
87 all callers to see they already guarantee this.
88 (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them
89 with assertions, after checking all callers to see they already guarantee this.
90 (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't
91 crash if called early on a brand new RenderSlider.
93 * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode.
94 Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
95 prefix for public DOM classes, not elements used as implementation details. Made the
96 mouseEventIsInThumb function non-virtual. Removed the return value and argument from
97 setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle
98 argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some
99 private member functions.
101 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com>
103 Reviewed by George Staikos.
105 Fix ambiguous else cases by adding braces to nested if()s with elses.
107 * loader/MainResourceLoader.cpp:
108 (WebCore::MainResourceLoader::continueAfterContentPolicy):
109 * page/EventHandler.cpp:
110 (WebCore::EventHandler::updateDragAndDrop):
111 * rendering/RenderListMarker.cpp:
112 (WebCore::toArmenianUnder10000):
113 * rendering/TextControlInnerElements.cpp:
114 (WebCore::TextControlInnerTextElement::defaultEventHandler):
116 2009-03-24 Eli Fidler <eli.fidler@torchmobile.com>
118 Reviewed by George Staikos.
120 Move variable into proper platform block to quiet warning.
122 * html/CanvasRenderingContext2D.cpp:
123 (WebCore::CanvasRenderingContext2D::drawTextInternal):
125 2009-03-24 Eric Carlson <eric.carlson@apple.com>
127 Reviewed by Antti Koivisto.
129 Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
131 * WebCore/html/HTMLMediaElement.cpp:
132 (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
133 network state of NETWORK_NO_SOURCE.
135 * WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
136 (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
137 some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
138 corresponds to HaveFutureData, not HaveEnoughData.
140 2009-03-24 Adele Peterson <adele@apple.com>
142 Reviewed by Darin Adler.
144 Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
145 <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
147 * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
148 After breaking out of an empty mail blockquote, we still want continue with the deletion
149 so actual content will get deleted, and not just the quote style.
151 2009-03-24 Darin Adler <darin@apple.com>
153 Reviewed by Brady Eidson.
155 <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
157 * loader/archive/cf/LegacyWebArchive.cpp:
158 (WebCore::LegacyWebArchive::create): Added a null check.
160 2009-03-24 Adam Langley <agl@google.com>
162 Reviewed by Darin Fisher.
164 https://bugs.webkit.org/show_bug.cgi?id=24685
166 The Skia drawLine function takes subpixel values and attempts to draw
167 a line with subpixel precision. This is complex and slow for drawing
168 scrollbars which use only vertical and horizontal lines.
170 This changes the Chromium Linux scrollbar code to use drawIRect.
172 * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
173 (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
174 (WebCore::drawVertLine):
175 (WebCore::drawHorizLine):
177 (WebCore::ScrollbarThemeChromium::paintTrackPiece):
178 (WebCore::ScrollbarThemeChromium::paintThumb):
180 2009-03-24 David Kilzer <ddkilzer@apple.com>
182 Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
184 <https://bugs.webkit.org/show_bug.cgi?id=23310>
186 Reviewed by Darin Adler.
188 Test: fast/frames/iframe-no-src-set-location.html
191 (WebCore::Document::completeURL): If m_baseURL is empty or is
192 about:blank and we have a parent document, use the parent
193 document's URL for the base when completing a new URL.
195 2009-03-24 Simon Fraser <simon.fraser@apple.com>
197 Reviewed by Dave Hyatt
199 https://bugs.webkit.org/show_bug.cgi?id=24659
201 When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
202 into the coordinate space of the layer, and doing so can result in pathalogical quads
203 that break hit testing. In that case, simply use the same bounds as used for painting,
204 which are the composited bounds for this layer.
206 Test: transforms/3d/hit-testing/rotated-hit-test.html
208 * rendering/RenderLayer.cpp:
209 (WebCore::RenderLayer::hitTestLayer):
211 2009-03-24 Simon Fraser <simon.fraser@apple.com>
213 Reviewed by Dave Hyatt
215 https://bugs.webkit.org/show_bug.cgi?id=24436
217 When compositing is enabled, painting and hit testing end up using different
218 clipping roots, because, for painting, every composited layer is a clipping root,
219 but for hit testing only layers with transforms are. To fix this, we use
220 temporary clip rects for hit testing, if the page is in compositing mode.
222 * rendering/RenderLayer.cpp:
223 (WebCore::RenderLayer::paintLayer):
224 (WebCore::RenderLayer::hitTestLayer):
225 (WebCore::RenderLayer::parentClipRects):
226 (WebCore::RenderLayer::calculateRects):
227 * rendering/RenderLayer.h:
229 2009-03-24 Simon Fraser <simon.fraser@apple.com>
231 Reviewed by Dan Bernstein
233 https://bugs.webkit.org/show_bug.cgi?id=24782
235 Fix regression with CSS clip rects with non-length values, by reverting to
236 the original code, but passing the zoom multiplier through convertToLength().
238 Also make stylistic change in createTransformOperations(), renaming 'inStyle'
241 Tested by existing tests.
243 * css/CSSStyleSelector.cpp:
244 (WebCore::convertToLength):
245 (WebCore::CSSStyleSelector::applyProperty):
246 (WebCore::CSSStyleSelector::createTransformOperations):
248 2009-03-24 David Hyatt <hyatt@apple.com>
250 Reviewed by Simon Fraser
252 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
255 This patch makes non-self-painting overflow layers and control clips work with border-radius. RenderLayers
256 that should be clipped by overflow ancestors with border-radius are still broken.
258 Added fast/clip/overflow-border-radius-clip.html
260 * rendering/RenderBox.cpp:
261 (WebCore::RenderBox::pushContentsClip):
263 2009-03-24 David Hyatt <hyatt@apple.com>
265 Reviewed by Simon Fraser
267 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
269 This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements. Common
270 replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
273 Added fast/replaced/border-radius-clip.html
276 * rendering/RenderReplaced.cpp:
277 (WebCore::RenderReplaced::paint):
278 * rendering/RenderWidget.cpp:
279 (WebCore::RenderWidget::paint):
281 2009-03-24 Adele Peterson <adele@apple.com>
285 Only build these Mail quirks checks in on the Mac.
287 * dom/Document.cpp: (WebCore::disableRangeMutation):
288 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
290 2009-03-24 Brent Fulgham <bfulgham@webkit.org>
292 Build fix, no review.
294 Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
297 * WebCore.vcproj/WebCore.vcproj:
299 2009-03-24 Eric Carlson <eric.carlson@apple.com>
301 Fix layout tests broken by r41907.
303 * html/HTMLMediaElement.cpp:
304 (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
306 2009-03-24 Dmitry Titov <dimich@chromium.org>
308 Reviewed by Dimitri Glazkov.
310 https://bugs.webkit.org/show_bug.cgi?id=24689
311 Fix Chromium compilation errors.
313 * bindings/v8/WorkerContextExecutionProxy.cpp:
314 (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
315 (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
317 2009-03-24 Yury Semikhatsky <yurys@chromium.org>
319 Reviewed by Darin Adler.
321 https://bugs.webkit.org/show_bug.cgi?id=24759
322 Add missing methods Element.prototype.removeMatchingStyleClasses and
323 Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
324 iframe. These methods are called by Element.prototype.removeStyleClass and
325 Node.prototype.enclosingNodeOrSelfWithNodeName.
327 * inspector/front-end/SourceFrame.js:
328 (WebInspector.SourceFrame.prototype._loaded):
330 2009-03-24 Mark Mentovai <mark@chromium.org>
332 Reviewed by Mark Rowe.
334 https://bugs.webkit.org/show_bug.cgi?id=24653
335 WebKit should be buildable without prefix header injection.
336 Adds missing #includes and forward declarations as needed.
338 * editing/SmartReplaceCF.cpp:
339 * platform/graphics/mac/ColorMac.mm:
340 * platform/graphics/mac/FontCacheMac.mm:
341 * platform/graphics/mac/FontCustomPlatformData.h:
342 * platform/graphics/mac/FontMac.mm:
343 * platform/graphics/mac/FontMacATSUI.mm:
344 * platform/graphics/mac/FontPlatformData.h:
345 * platform/graphics/mac/FontPlatformDataMac.mm:
346 * platform/graphics/mac/GraphicsContextMac.mm:
347 * platform/graphics/mac/SimpleFontDataMac.mm:
348 * platform/mac/FoundationExtras.h:
349 * platform/mac/LocalCurrentGraphicsContext.h:
350 * platform/mac/WebCoreSystemInterface.h:
351 * platform/mac/WebCoreSystemInterface.mm:
352 * platform/mac/WebCoreTextRenderer.h:
353 * platform/mac/WebCoreTextRenderer.mm:
354 * platform/mac/WebFontCache.h:
355 * platform/mac/WebFontCache.mm:
356 * platform/text/PlatformString.h:
357 * platform/text/mac/ShapeArabic.c:
358 * platform/text/mac/StringMac.mm:
359 * rendering/RenderThemeChromiumMac.h:
361 2009-03-24 Dan Bernstein <mitz@apple.com>
363 Reviewed by Darin Adler.
365 - fix <rdar://problem/6107874> by capping the nesting depth of
366 "block-level" elements generated by the parser
368 Test: fast/parser/block-nesting-cap.html
370 * html/HTMLParser.cpp:
371 (WebCore::HTMLParser::HTMLParser):
372 (WebCore::HTMLParser::insertNode):
373 (WebCore::HTMLParser::pushBlock):
374 (WebCore::HTMLParser::popOneBlockCommon):
375 (WebCore::HTMLParser::freeBlock):
378 2009-03-23 Greg Bolsinga <bolsinga@apple.com>
380 Reviewed by David Kilzer.
382 https://bugs.webkit.org/show_bug.cgi?id=24771
384 DOMTimeStamps are based upon 1970.
386 * platform/mac/GeolocationServiceMac.mm:
387 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
389 2009-03-23 Eric Seidel <eric@webkit.org>
391 Build fix, no review.
393 * rendering/RenderObject.cpp:
394 (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
396 2009-03-23 Eric Seidel <eric@webkit.org>
398 Reviewed by Darin Adler.
400 Rename Position::container to m_anchorNode and make it private
401 https://bugs.webkit.org/show_bug.cgi?id=24760
403 More code cleanup for Position.
405 Change all uses of m_container to node()
406 Eventually most uses of node() should change to anchorNode() to designate
407 that it's the node the Position is anchored to, but not necessarily the
408 container of the position (it could be the before/after neighbor).
410 Remove any code which sets m_container, and change it to use a new
411 Position::moveToPosition function which takes a node and offset.
412 It never makes sense to change the node and leave the offset.
415 (WebCore::Position::Position):
416 (WebCore::Position::clear):
417 (WebCore::Position::anchorNode):
418 (WebCore::Position::node):
419 (WebCore::Position::moveToPosition):
420 (WebCore::Position::moveToOffset):
421 (WebCore::Position::isNull):
422 (WebCore::Position::isNotNull):
423 (WebCore::operator==):
425 (WebCore::Range::create):
426 (WebCore::Range::compareBoundaryPoints):
427 * dom/RangeBoundaryPoint.h:
428 (WebCore::RangeBoundaryPoint::container):
429 (WebCore::RangeBoundaryPoint::set):
430 (WebCore::RangeBoundaryPoint::setOffset):
431 (WebCore::RangeBoundaryPoint::setToChild):
432 (WebCore::RangeBoundaryPoint::setToStart):
433 (WebCore::RangeBoundaryPoint::setToEnd):
435 2009-03-17 Eric Seidel <eric@webkit.org>
437 Reviewed by David Hyatt.
439 document.write() should be able to make a document strict mode
440 https://bugs.webkit.org/show_bug.cgi?id=24336
442 Remove an implicit write of "<html>" on the first document.write call
443 this was added as part of a KDE import http://trac.webkit.org/changeset/798
444 with no layout test or explanation. I can't think of any reason why
445 an implicit <html> write is necessary (or correct), so I'm removing it and
446 adding a test for the correct behavior. The parser will add any necessary
447 HTMLHTMLElements during the write() anyway.
449 Our behavior is now tested by fast/dom/Document/document-write-doctype
450 and matches IE, FF fails this new test. Mozilla bug filed:
451 https://bugzilla.mozilla.org/show_bug.cgi?id=483908
454 (WebCore::Document::write):
456 2009-03-23 Sam Weinig <sam@webkit.org>
458 Reviewed by Dan Bernstein.
460 Fix for <rdar://problem/6140966>
461 Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
464 * WebCore.xcodeproj/project.pbxproj:
465 * loader/CrossOriginPreflightResultCache.cpp:
466 (WebCore::CrossOriginPreflightResultCache::empty):
467 * loader/CrossOriginPreflightResultCache.h:
469 2009-03-23 Darin Adler <darin@apple.com>
471 Reviewed by Adele Peterson.
473 Bug 24726: hit testing doesn't work right when the click is on anonymous content
474 https://bugs.webkit.org/show_bug.cgi?id=24726
475 rdar://problem/6696992
477 Test: editing/selection/hit-test-anonymous.html
479 * rendering/RenderBR.cpp:
480 (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
481 creating a VisiblePosition directly. It will handle finding non-anonymous
482 content nearby if node() is 0.
483 * rendering/RenderBlock.cpp:
484 (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
485 (WebCore::positionForPointWithInlineChildren): Ditto.
486 (WebCore::RenderBlock::positionForPoint): Ditto.
487 * rendering/RenderBox.cpp:
488 (WebCore::RenderBox::positionForPoint): Ditto.
489 * rendering/RenderObject.cpp:
490 (WebCore::RenderObject::positionForPoint): Ditto.
491 (WebCore::RenderObject::createVisiblePosition): Added.
492 * rendering/RenderObject.h: Added createVisiblePosition.
493 * rendering/RenderReplaced.cpp:
494 (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
495 * rendering/RenderSVGInlineText.cpp:
496 (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
497 * rendering/RenderText.cpp:
498 (WebCore::RenderText::positionForPoint): Ditto.
500 2009-03-23 Adele Peterson <adele@apple.com>
502 Reviewed by Darin Adler & Dave Hyatt.
504 Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
506 Leopard Mail doesn't expect <style> to be in the body. This change reverts back to the old behavior of
507 moving <style> to <head> for that version of Mail.
509 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
511 2009-03-23 Adele Peterson <adele@apple.com>
513 Reviewed by Mark Rowe & Dave Hyatt.
515 Merge some of the individual Mail quirks into two settings that we can check for future quirks.
519 (WebCore::disableRangeMutation):
520 (WebCore::Document::nodeChildrenChanged):
521 (WebCore::Document::nodeWillBeRemoved):
522 (WebCore::Document::textInserted):
523 (WebCore::Document::textRemoved):
524 (WebCore::Document::textNodesMerged):
525 (WebCore::Document::textNodeSplit):
527 (WebCore::Settings::Settings):
528 (WebCore::Settings::setNeedsLeopardMailQuirks):
529 (WebCore::Settings::setNeedsTigerMailQuirks):
531 (WebCore::Settings::needsLeopardMailQuirks):
532 (WebCore::Settings::needsTigerMailQuirks):
534 2009-03-23 Ada Chan <adachan@apple.com>
536 https://bugs.webkit.org/show_bug.cgi?id=24762
537 Support text-indent in <option> elements on windows platform.
539 Reviewed by Adele Peterson.
542 * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now. Make this
543 explicit via windows themed default stylesheet.
544 (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
545 (WebCore::PopupMenuStyle::textIndent):
546 (WebCore::PopupMenuStyle::textDirection):
547 * platform/win/PopupMenuWin.cpp:
548 (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and
549 text-indent is specified with LTR direction.
550 * rendering/RenderMenuList.cpp:
551 (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
552 (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
553 (WebCore::RenderMenuList::menuStyle): Ditto.
554 * rendering/RenderTextControlSingleLine.cpp:
555 (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
556 * rendering/RenderTheme.h:
557 (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added. Default is false since we are only supporting it in windows for now.
558 * rendering/RenderThemeWin.h:
559 (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
561 2009-03-23 Sam Weinig <sam@webkit.org>
563 Reviewed by Anders Carlsson.
565 Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
566 REGRESSION: Java Applets broken
567 <rdar://problem/6707494>
569 Fix loading Java applets without a codeBase. Only pass the base (up to the
570 the last path component) of the baseURL to the plug-in.
572 * html/HTMLAppletElement.cpp:
573 (WebCore::HTMLAppletElement::createRenderer):
575 (WebCore::KURL::baseAsString):
578 2009-03-23 Darin Adler <darin@apple.com>
580 Reviewed by Sam Weinig.
582 * platform/KURL.h: Removed now-incorrect comments.
583 None of the parts include the separator characters any more, now that
584 query doesn't include the "?", so the comments explaining which do and do
585 not are no-longer helpful.
587 2009-03-23 David Levin <levin@chromium.org>
589 Reviewed by Dimitri Glazkov.
591 https://bugs.webkit.org/show_bug.cgi?id=24764
593 Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
594 class names. Also fixed some headers that got mangled in search/replace
597 No change in behavior, so no test.
599 * bindings/v8/V8NodeFilter.h: Removed.
600 * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
601 * bindings/v8/V8NodeFilterCondition.h: Added.
602 * bindings/v8/custom/V8ClipboardCustom.cpp:
603 * bindings/v8/custom/V8DocumentCustom.cpp:
604 * bindings/v8/custom/V8ElementCustom.cpp:
605 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
606 * bindings/v8/custom/V8NavigatorCustom.cpp:
608 2009-03-23 Darin Fisher <darin@chromium.org>
610 Reviewed by Antti Koivisto.
612 https://bugs.webkit.org/show_bug.cgi?id=24741
614 Adds a unique across-browser-sessions identifier to FormData, which may
615 be used by ResourceHandle as a secondary cache key to enable cached
618 At issue: two otherwise identical form submissions may result in
619 completely independent responses, which may each be appropriate to
620 store and reuse from cache.
622 * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
623 we only enable cached form submissions for those generated by HTML. This
624 way we do not bother with POSTs generated by XMLHttpRequest.
625 (WebCore::generateFormDataIdentifier):
626 (WebCore::HTMLFormElement::createFormData):
627 * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
628 the unspecified identifier. So by default there is no identifier and
630 (WebCore::FormData::FormData):
631 * platform/network/FormData.h: Added m_identifier with setter and getter.
632 (WebCore::FormData::setIdentifier):
633 (WebCore::FormData::identifier):
635 2009-03-23 Simon Fraser <simon.fraser@apple.com>
637 Reviewed by Antti Koivisto
639 https://bugs.webkit.org/show_bug.cgi?id=24733
641 Fix media controller with full-page zoom. Previously, the media controller
642 shadow nodes never saw style changes on the RenderMedia, so did not respond
643 to zooming at all. Now, we update the style on the shadow renderers
644 whenever RenderMedia gets a style change. Also fix the video thumb in
645 the theme to be scaled properly.
647 Test: media/video-controls-zoomed.html
649 * rendering/MediaControlElements.cpp:
650 (WebCore::MediaControlShadowRootElement::updateStyle):
651 (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
652 (WebCore::MediaTextDisplayElement::updateStyle):
653 (WebCore::MediaControlInputElement::MediaControlInputElement):
654 (WebCore::MediaControlInputElement::updateStyle):
655 * rendering/MediaControlElements.h:
656 * rendering/RenderMedia.cpp:
657 (WebCore::RenderMedia::styleDidChange):
658 * rendering/RenderMedia.h:
659 * rendering/RenderThemeMac.mm:
660 (WebCore::RenderThemeMac::adjustSliderThumbSize):
662 2009-03-23 Mike Belshe <mike@belshe.com>
664 Reviewed by Darin Adler.
666 https://bugs.webkit.org/show_bug.cgi?id=24739
668 Rework StringImpl::create methods to try to allocate a single buffer
669 rather than allocating both the StringImpl class and a separate data
672 * platform/text/StringImpl.cpp:
673 * platform/text/StringImpl.h:
675 2009-03-23 Darin Adler <darin@apple.com>
677 Reviewed by Antti Koivisto.
679 Based on a patch by Nico Weber <nicolasweber@gmx.de>
681 Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
682 https://bugs.webkit.org/show_bug.cgi?id=24755
684 * platform/text/TextEncoding.cpp:
685 (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
686 is UTF7 without loading extended codecs.
687 (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
688 of comparing with UTF7Encoding(). Eliminate the explicit check of
689 noExtendedTextEncodingNameUsed() because that's now handled by the functions
690 that this function calls instead.
692 * platform/text/TextEncoding.h: Added isUTF7Encoding function.
693 Also tweaked formatting a bit.
695 2009-03-20 Peter Kasting <pkasting@google.com>
697 Reviewed by Darin Fisher.
699 https://bugs.webkit.org/show_bug.cgi?id=24720
700 RenderThemeChromium should draw something for Slider parts instead of
701 dropping them on the floor.
703 * platform/chromium/ChromiumBridge.h:
704 * rendering/RenderThemeChromiumWin.cpp:
705 (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
706 (WebCore::RenderThemeChromiumWin::paintSliderTrack):
707 (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
708 (WebCore::RenderThemeChromiumWin::getThemeData):
709 * rendering/RenderThemeChromiumWin.h:
710 (WebCore::RenderThemeChromiumWin::paintSliderThumb):
712 2009-03-23 Glen Murphy <glen@chromium.org>
714 Reviewed by Darin Fisher.
716 https://bugs.webkit.org/show_bug.cgi?id=24657
718 Fix Skia drawing of highly scaled bitmaps; the conversion to
719 IntRect produced visible layout test failures in highly scaled
722 Test: svg/custom/image-small-width-height.svg
724 * WebCore\platform\graphics\skia\ImageSkia.cpp:
726 2009-03-23 David Kilzer <ddkilzer@apple.com>
728 Provide JavaScript exception information after slow script timeout
730 Reviewed by Oliver Hunt.
732 * bindings/js/ScriptController.cpp:
733 (WebCore::ScriptController::evaluate): Changed to report
734 exceptions for the Interrupted completion type as well.
736 2009-03-23 Simon Fraser <simon.fraser@apple.com>
738 Reviewed by Darin Adler
740 https://bugs.webkit.org/show_bug.cgi?id=24736
742 Fix three mostly-unrelated problems with full-page zoom:
745 (WebCore::Document::elementFromPoint):
746 Document::elementFromPoint() needs to take full-page zoom into account.
748 * dom/MouseRelatedEvent.cpp:
749 (WebCore::MouseRelatedEvent::receivedTarget):
750 Take full-page zoom into account when computing offsetX/offsetY.
752 * html/HTMLSelectElement.cpp:
753 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
754 Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
755 with full-page zoom, and using pageX/pageY is easier because we don't
756 have to worry about the event target, and we already have a point in
757 absolute coordinates.
759 Tests: fast/forms/listbox-hit-test-zoomed.html
760 fast/forms/search-zoomed.html
761 fast/forms/slider-zoomed.html
763 2009-03-23 Simon Fraser <simon.fraser@apple.com>
765 Reviewed by Dan Bernstein
767 https://bugs.webkit.org/show_bug.cgi?id=24753
769 The rect for CSS 'clip' needs to have zooming applied to it.
771 Test: fast/css/clip-zooming.html
773 * css/CSSStyleSelector.cpp:
774 (WebCore::CSSStyleSelector::applyProperty):
776 2009-03-23 Eric Carlson <eric.carlson@apple.com>
778 Reviewed by Adam Roben.
780 <rdar://problem/6704282>
781 https://bugs.webkit.org/show_bug.cgi?id=24719
782 QTMovieWinTimer logic inversion
784 Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
785 use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
786 this was that a movie timer would sometimes be blocked for significant amounts of time
787 because WM_TIMER messages are not processed when the thread's message queue has any
788 higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
789 timers. Also change SetTimer call to use HWND and custom message instead of
790 timer function since the timer already has an HWND for processing PostMessage.
792 Not possible to make a test for this because it is so timing dependant.
794 * platform/graphics/win/QTMovieWinTimer.cpp:
795 (TimerWindowWndProc):
796 (setSharedTimerFireDelay):
798 2009-03-23 Eric Carlson <eric.carlson@apple.com>
800 Reviewed by Adele Peterson.
802 https://bugs.webkit.org/show_bug.cgi?id=24588
804 Update media element implementation to current HTML5 spec
807 media/media-constants.html
808 media/video-seek-no-src-exception.html
809 media/video-source-add-src.html
810 media/video-src-invalid-remove.html
811 media/video-src-plus-source.html
812 media/video-timeupdate-during-playback.html
814 * dom/EventNames.h: Remove obsolute events, add new ones.
815 * html/HTMLMediaElement.cpp:
816 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
817 (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
819 (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
820 (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and
821 add it to the event queue to be dispatch when the timer fires.
822 (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
823 it to the event queue to be dispatch when the timer fires.
824 (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the
826 (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
827 (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
828 try to load the next <source> url.
829 (WebCore::HTMLMediaElement::load): Minor style change.
830 (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
831 the current load (if any) and set up state for a new load.
832 (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
833 event, and initiate load from 'src' if present.
834 (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
835 noneSupported() if no more to consider.
836 (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
837 (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
838 (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid
840 (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid
841 media engine failed with a decode error or a network error.
842 (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
843 (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
844 (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
845 (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
846 (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
847 (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
848 if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
849 we use to guard against sending 'ended' more than once.
850 (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
851 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
853 (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
854 invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
855 (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
856 starts loading asynchronously.
857 (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
858 event depending on current state.
859 (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
860 starts loading asynchronously.
861 (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
862 (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
863 (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
864 (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
865 (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
866 (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
867 second when the movie is playing to timeupdate so we can post 'timeupdate' events.
868 (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
869 (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
870 event because we both fire them them when the spec says we should and when the media engine
871 says that time has jumped, but we don't want to fire more than one at a given movie time. We also
872 use this bottleneck to keep track of the last time one was posted so we won't fire too often
874 (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
875 (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
876 element with a 'src' attribute that we have not tried to load yet.
877 (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
878 <source> element that we haven't tried to load.
879 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
880 Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
881 some media engines call this proc more than once when playback reaches the end and stops, but we
882 don't want to post 'ended' more than once.
883 (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
884 when the movie duration changes and we can post 'durationchanged' event.
885 (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
886 the rate changed and we can updated our cached rate. This is useful because we only want to know
887 post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
888 the actual playback rate when it differs from what we tried to set.
889 (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
890 a movie's intrinsic size changes and we can inform the renderer.
891 (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
892 uses "actively playing" for this concept. Update logic for new state names and un-comment calls
893 to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
894 are part of the answer.
895 (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names.
896 (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
897 the determination of "potentially playing".
898 (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
899 agent supports this spec concept.
900 (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate'
901 events when we pauses the movie. Set the media engine rate before calling play() in case it
902 wasn't set up when the rate was changed.
903 (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
905 (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
906 and updated for the current spec.
907 (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
908 (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
909 (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the
911 * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
912 update for changes in .cpp.
913 (WebCore::HTMLMediaElement::):
915 * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
916 defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
918 * html/HTMLSourceElement.cpp:
919 (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
921 * html/HTMLVideoElement.cpp:
922 (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
925 (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
927 * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
929 * loader/MediaDocument.cpp:
930 (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
932 * platform/graphics/MediaPlayer.cpp:
933 (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
934 (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
935 (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
936 (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
937 * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
939 (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
940 (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
941 (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
942 (WebCore::MediaPlayer::):
944 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
945 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
946 (WebCore::MediaPlayerPrivate::load): Ditto.
947 (WebCore::MediaPlayerPrivate::updateStates): Ditto.
948 (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.
950 * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
951 Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
952 (WebCore::MediaPlayerPrivate::metaDataAvailable):
953 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
954 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
955 m_enabledTrackCount and m_duration. Update for network/ready state name changes.
956 (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
957 (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
958 (WebCore::MediaPlayerPrivate::pause): Ditto.
959 (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
960 (WebCore::MediaPlayerPrivate::seek): Ditto.
961 (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
963 (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
964 (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
965 different errors depending on what causes a failure. Watch for and report duration changes.
966 (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
967 (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
968 (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
969 (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
970 (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
971 tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.
973 * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
974 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
975 (WebCore::MediaPlayerPrivate::load): Ditto.
976 (WebCore::MediaPlayerPrivate::duration): Ditto.
977 (WebCore::MediaPlayerPrivate::updateStates): Ditto.
978 (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
980 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
981 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for
982 network/ready state name changes.
983 (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
985 (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
986 (WebCore::MediaPlayerPrivate::pause): Ditto.
987 (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
988 (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
989 (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
990 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
992 * rendering/MediaControlElements.cpp:
993 (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state
995 (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
997 2009-03-22 Kevin Ollivier <kevino@theolliviers.com>
999 wxGTK build fix. Add missing header.
1001 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
1003 2009-03-22 Simon Fraser <simon.fraser@apple.com>
1005 Reviewed by Dan Bernstein
1007 https://bugs.webkit.org/show_bug.cgi?id=24665
1009 Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
1010 setting HitTestResult::innerNode(), but returning false, which violates
1011 hit testing rules. Use a temporary HitTestResult so that we only fill in
1012 result when we know we've hit.
1014 * rendering/RenderImage.cpp:
1015 (WebCore::RenderImage::nodeAtPoint):
1017 2009-03-22 Simon Fraser <simon.fraser@apple.com>
1019 Reviewed by Dan Bernstein
1021 https://bugs.webkit.org/show_bug.cgi?id=24743
1023 Fix hit testing regression from r41840. We need to pass the temporary
1024 HitTestResult when testing sublayers, then only copy to 'result' when
1025 the layer is known to have been hit.
1027 Test: fast/layers/zindex-hit-test.html
1029 * rendering/RenderLayer.cpp:
1030 (WebCore::RenderLayer::hitTestLayer):
1032 2009-03-20 Simon Fraser <simon.fraser@apple.com>
1034 Reviewed by Darin Adler
1036 https://bugs.webkit.org/show_bug.cgi?id=24733
1038 Fix hit testing on video controls after full page zoom by fixing wider issue
1039 with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
1040 invariant under zooming (for JavaScript), so we keep an actual page point around
1041 in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.
1043 * dom/MouseRelatedEvent.cpp:
1044 (WebCore::MouseRelatedEvent::initCoordinates):
1045 (WebCore::MouseRelatedEvent::computePageLocation):
1046 * dom/MouseRelatedEvent.h:
1047 (WebCore::MouseRelatedEvent::absoluteLocation):
1048 (WebCore::MouseRelatedEvent::setAbsoluteLocation):
1049 Member var, and getter and setter for absoluteLocation.
1050 New method, computePageLocation(), to compute the actual page point,
1051 and call it when creating and initting mouse-related events.
1054 (WebCore::Node::dispatchMouseEvent):
1055 (WebCore::Node::dispatchWheelEvent):
1056 Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
1057 on the event to replace a potentially rounded point.
1059 * html/HTMLInputElement.cpp:
1060 (WebCore::HTMLInputElement::defaultEventHandler):
1061 Clean up slider handling code.
1063 * html/HTMLSelectElement.cpp:
1064 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1065 Add FIXME comment for use of offsetX/offsetY.
1067 * page/ContextMenuController.cpp:
1068 (WebCore::ContextMenuController::handleContextMenuEvent):
1069 Use absoluteLocation() when hit testing for context menus.
1071 * rendering/RenderFrameSet.cpp:
1072 (WebCore::RenderFrameSet::userResize):
1073 Use absoluteLocation() when resizing frames.
1075 * rendering/RenderMedia.cpp:
1076 (WebCore::RenderMedia::forwardEvent):
1077 Use absoluteLocation() when hit testing media controls.
1079 * rendering/RenderSlider.cpp:
1080 (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1081 (WebCore::RenderSlider::mouseEventIsInThumb):
1082 Use absoluteLocation() when handling slider events.
1084 (WebCore::RenderSlider::forwardEvent):
1085 Factor some code out of HTMLInputElement::defaultEventHandler().
1087 * rendering/RenderTextControlSingleLine.cpp:
1088 (WebCore::RenderTextControlSingleLine::forwardEvent):
1089 Use absoluteLocation() when hit testing search field buttons, which fixees
1090 bugs in the search field with zooming.
1092 2009-03-21 David Levin <levin@chromium.org>
1094 Reviewed by Dimitri Glazkov.
1096 https://bugs.webkit.org/show_bug.cgi?id=24727
1097 Add V8XMLHttpRequest*.
1099 * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
1100 * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
1101 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
1102 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
1103 * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.
1105 2009-03-21 David Levin <levin@chromium.org>
1107 Reviewed by Dimitri Glazkov.
1109 https://bugs.webkit.org/show_bug.cgi?id=24725
1112 * bindings/v8/V8NodeFilter.cpp: Added.
1113 * bindings/v8/V8NodeFilter.h: Added.
1115 2009-03-21 Dan Bernstein <mitz@apple.com>
1117 Rubber-stamped by Kevin Decker
1119 - remove some redundant #include statements
1121 * bindings/js/JSDOMWindowBase.cpp:
1123 2009-03-20 Dan Bernstein <mitz@apple.com>
1125 Reviewed by Mark Rowe.
1127 - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
1129 * platform/graphics/win/FontCGWin.cpp:
1130 (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
1131 glyph as a separate path, instead of all glyphs as a single path. This
1132 matches what CGContextShowGlyphsWithAdvances() does, and has comparable
1135 2009-03-20 Dean Jackson <dino@apple.com>
1137 Reviewed by Simon Fraser
1139 Build fix for ENABLE(3D_RENDERING)
1141 * rendering/RenderObject.h:
1142 (WebCore::makeMatrixRenderable):
1144 2009-03-20 Dave Moore <davemoore@google.com>
1146 Reviewed by Dimitri Glazkov.
1148 https://bugs.webkit.org/show_bug.cgi?id=24705
1150 A bug in the V8 bindings is preventing chromium from setting the href on the
1151 location object...any attempt throws a security error, not just for javascript
1154 * page/Location.idl:
1156 2009-03-20 Craig Schlenter <craig.schlenter@gmail.com>
1158 Reviewed by Dimitri Glazkov.
1160 https://bugs.webkit.org/show_bug.cgi?id=24608
1162 Include stdio.h needed for printf on gcc 4.4.0
1164 * platform/KURLGoogle.cpp:
1166 2009-03-20 Mike Belshe <mike@belshe.com>
1168 Reviewed by Darin Fisher.
1170 https://bugs.webkit.org/show_bug.cgi?id=24577
1172 Don't let comments at the end of an event handler
1173 break the event handler.
1175 No change in behavior, so no test.
1177 * bindings/v8/V8LazyEventListener.cpp:
1178 (WebCore::V8LazyEventListener::getWrappedListenerFunction):
1180 2009-03-20 Norbert Leser <norbert.leser@nokia.com>
1182 Reviewed by Darin Adler.
1184 https://bugs.webkit.org/show_bug.cgi?id=24535
1186 Fixes missing line terminator character (;) after macro call.
1187 It is common practice to add the trailing ";" where macros are substituted
1188 and not where they are defined with #define.
1189 This change is consistent with other macro declarations across webkit,
1190 and it also solves compilation failure with symbian compilers.
1192 No change in behavior, so no test.
1194 * bindings/js/JSDOMWindowShell.cpp:
1195 * bindings/js/JSEventListener.cpp:
1196 * bindings/js/JSImageConstructor.cpp:
1197 * bindings/js/JSInspectedObjectWrapper.cpp:
1198 * bindings/js/JSInspectorCallbackWrapper.cpp:
1199 * bindings/js/JSNamedNodesCollection.cpp:
1200 * bindings/js/JSNodeFilterCondition.cpp:
1201 * bindings/js/JSOptionConstructor.cpp:
1202 * bindings/js/JSQuarantinedObjectWrapper.cpp:
1203 * bindings/js/JSRGBColor.cpp:
1204 * bindings/js/JSWorkerContextBase.cpp:
1205 * bindings/js/JSXMLHttpRequestConstructor.cpp:
1206 * bindings/js/JSXSLTProcessorConstructor.cpp:
1207 * bindings/scripts/CodeGeneratorJS.pm:
1209 2009-03-20 Mike Belshe <mike@belshe.com>
1211 Reviewed by Dimitri Glazkov and Dave Hyatt.
1213 https://bugs.webkit.org/show_bug.cgi?id=24324
1215 Make the minimum timer configurable for different platforms.
1217 * page/DOMTimer.cpp:
1218 (WebCore::DOMTimer::DOMTimer):
1219 (WebCore::DOMTimer::fired):
1221 (WebCore::DOMTimer::minTimerInterval):
1222 (WebCore::DOMTimer::setMinTimerInterval):
1224 2009-03-20 Dean McNamee <deanm@chromium.org>
1226 Reviewed by Darin Adler.
1228 https://bugs.webkit.org/show_bug.cgi?id=22834
1230 Make sure to consistently match new/delete and fastMalloc/fastFree.
1232 * css/CSSSelectorList.cpp:
1233 (WebCore::CSSSelectorList::adoptSelectorVector):
1234 (WebCore::CSSSelectorList::deleteSelectors):
1236 2009-03-20 Dan Bernstein <mitz@apple.com>
1238 Reviewed by Dave Hyatt.
1240 - fix https://bugs.webkit.org/show_bug.cgi?id=23739
1241 <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
1243 * rendering/RenderBlock.cpp:
1244 (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
1245 * rendering/RenderBlock.h:
1246 * rendering/RenderTableSection.cpp:
1247 (WebCore::RenderTableSection::layoutRows): Extended the check for
1248 children that flex to include other descendants with percent height
1249 which is relative to the cell.
1251 2009-03-20 Dmitry Titov <dimich@chromium.org>
1253 Reviewed by Alexey Proskuryakov.
1255 https://bugs.webkit.org/show_bug.cgi?id=24706
1256 Remove ScriptExecutionContext::encoding() since Workers do not need it.
1257 WorkerContext::encoding() is simply removed, while Document::encoding()
1258 made non-virtual and private. Workers use UTF-8 now except when instructed
1259 otherwise by http header. Also updated test.
1261 * dom/Document.h: Made encoding() non-virtual and private.
1262 * dom/ScriptExecutionContext.h: removed encoding().
1264 * workers/Worker.cpp:
1265 (WebCore::Worker::Worker):
1266 (WebCore::Worker::notifyFinished):
1267 * workers/WorkerContext.cpp: removed encoding() implementation.
1268 (WebCore::WorkerContext::WorkerContext):
1269 (WebCore::WorkerContext::completeURL):
1270 * workers/WorkerContext.h: removed encoding()
1271 (WebCore::WorkerContext::create):
1272 * workers/WorkerContextProxy.h:
1273 * workers/WorkerImportScriptsClient.cpp:
1274 (WebCore::WorkerImportScriptsClient::didReceiveData):
1275 * workers/WorkerMessagingProxy.cpp:
1276 (WebCore::WorkerMessagingProxy::startWorkerContext):
1277 * workers/WorkerMessagingProxy.h:
1278 * workers/WorkerThread.cpp:
1279 (WebCore::WorkerThreadStartupData::create):
1280 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1281 (WebCore::WorkerThread::create):
1282 (WebCore::WorkerThread::WorkerThread):
1283 (WebCore::WorkerThread::workerThread):
1284 * workers/WorkerThread.h:
1285 In all these, removed storing encoding and 'inheriting' it from the parent.
1286 Instead, they are all using UTF-8 now.
1288 2009-03-20 Timothy Hatcher <timothy@apple.com>
1290 Change how threading exceptions are checked so they are reported
1291 by what round they were added. That way WebKit can decided the
1292 behavior per-round based on linked-on-or-after checks.
1294 <rdar://problem/6626741&6648478&6635474&6674079>
1296 Reviewed by Darin Adler.
1298 * WebCore.base.exp: Export the new symbols.
1299 * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
1300 * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
1301 * platform/ThreadCheck.h:
1302 * platform/mac/ThreadCheck.mm:
1303 (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
1304 (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
1305 (WebCore::reportThreadViolation): Ditto.
1306 (WebCoreReportThreadViolation): Ditto.
1308 2009-03-20 Geoffrey Garen <ggaren@apple.com>
1310 Reviewed by Sam Weinig.
1312 Fixed up an out-of-date comment.
1314 * bindings/js/JSDOMWindowCustom.h:
1315 (WebCore::JSDOMWindow::customPut):
1317 2009-03-20 Beth Dakin <bdakin@apple.com>
1319 Reviewed by Dave Hyatt.
1321 Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION
1322 (r35318): A press release at pfizer.com does not display correctly
1323 - and corresponding -
1324 <rdar://problem/6680073>
1326 * rendering/RenderObject.cpp:
1327 (WebCore::RenderObject::invalidateContainerPrefWidths):
1328 * rendering/RenderObject.h:
1329 (WebCore::RenderObject::markContainingBlocksForLayout):
1331 2009-03-20 Eric Seidel <eric@webkit.org>
1333 Reviewed by Justin Garcia.
1335 maxDeepOffset is confusing and should be removed
1336 https://bugs.webkit.org/show_bug.cgi?id=24586
1338 Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
1339 Add first/lastDeepEditingPositionForNode Position creation functions
1340 and deploy them to places we used to call maxDeepOffset.
1342 Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
1343 Add a new Position::atFirst/atLastEditingPositionForNode() and use these
1344 to replace a few more callers for maxDeepOffset()
1346 Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
1348 "Editing positions" are confusing because they have one
1349 of two behaviors, depending on if the container node is ignored
1350 by editing (if editingIgnoresContent(node) returns true) or not.
1351 Positions referring to nodes ignored by editing are
1352 neighbor-relative (they are before or after the node) where as
1353 positions reffering to other nodes are container-relative
1354 (they are between two child nodes of the container, identified
1355 by the offset() member). I will be fixing this confusion in
1356 future patches. These renames hopefully make the current behavior clearer.
1359 (WebCore::Position::previous):
1360 (WebCore::Position::next):
1361 (WebCore::Position::atFirstEditingPositionForNode):
1362 (WebCore::Position::atLastEditingPositionForNode):
1363 (WebCore::Position::atStartOfTree):
1364 (WebCore::Position::atEndOfTree):
1365 (WebCore::Position::previousCharacterPosition):
1366 (WebCore::Position::nextCharacterPosition):
1367 (WebCore::Position::upstream):
1368 (WebCore::Position::isCandidate):
1369 (WebCore::firstDeepEditingPositionForNode):
1370 (WebCore::lastDeepEditingPositionForNode):
1372 * dom/PositionIterator.cpp:
1373 (WebCore::PositionIterator::operator Position):
1374 (WebCore::PositionIterator::increment):
1375 (WebCore::PositionIterator::decrement):
1376 (WebCore::PositionIterator::atEnd):
1377 (WebCore::PositionIterator::atEndOfNode):
1378 * editing/CompositeEditCommand.cpp:
1379 (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
1380 * editing/DeleteSelectionCommand.cpp:
1381 (WebCore::isTableCellEmpty):
1382 (WebCore::DeleteSelectionCommand::removeNode):
1383 (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1384 * editing/Editor.cpp:
1385 (WebCore::Editor::advanceToNextMisspelling):
1386 * editing/InsertLineBreakCommand.cpp:
1387 (WebCore::InsertLineBreakCommand::doApply):
1388 * editing/InsertListCommand.cpp:
1389 (WebCore::InsertListCommand::doApply):
1390 * editing/ReplaceSelectionCommand.cpp:
1391 (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
1392 * editing/TypingCommand.cpp:
1393 (WebCore::TypingCommand::forwardDeleteKeyPressed):
1394 * editing/VisiblePosition.cpp:
1395 (WebCore::VisiblePosition::previous):
1396 (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
1397 (WebCore::VisiblePosition::left):
1398 (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
1399 (WebCore::VisiblePosition::right):
1400 * editing/VisibleSelection.cpp:
1401 (WebCore::VisibleSelection::selectionFromContentsOfNode):
1402 (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
1403 * editing/htmlediting.cpp:
1404 (WebCore::nextVisuallyDistinctCandidate):
1405 (WebCore::previousVisuallyDistinctCandidate):
1406 (WebCore::firstEditablePositionAfterPositionInRoot):
1407 (WebCore::lastEditablePositionBeforePositionInRoot):
1408 (WebCore::lastOffsetForEditing):
1409 (WebCore::isFirstPositionAfterTable):
1410 (WebCore::isLastPositionBeforeTable):
1411 (WebCore::positionBeforeNode):
1412 (WebCore::positionAfterNode):
1413 (WebCore::enclosingEmptyListItem):
1414 (WebCore::caretMaxOffset):
1415 * editing/htmlediting.h:
1416 * editing/visible_units.cpp:
1417 (WebCore::renderedAsNonInlineTableOrHR):
1418 (WebCore::startOfParagraph):
1419 (WebCore::endOfParagraph):
1420 (WebCore::startOfEditableContent):
1421 (WebCore::endOfEditableContent):
1422 * page/AccessibilityObject.cpp:
1423 (WebCore::endOfStyleRange):
1424 * page/AccessibilityRenderObject.cpp:
1425 (WebCore::AccessibilityRenderObject::visiblePositionRange):
1426 * rendering/RenderBox.cpp:
1427 (WebCore::RenderBox::positionForPoint):
1429 2009-03-20 Dmitry Titov <dimich@chromium.org>
1431 Reviewed by Dimitri Glazkov.
1433 https://bugs.webkit.org/show_bug.cgi?id=24689
1434 Add (upstream) V8 bindings for Workers. Mostly style cleaning.
1436 * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
1437 * bindings/v8/WorkerContextExecutionProxy.h: Added.
1438 * bindings/v8/WorkerScriptController.cpp: Added.
1439 * bindings/v8/WorkerScriptController.h: Added.
1440 * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
1441 * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
1442 * bindings/v8/V8WorkerContextEventListener.cpp:
1443 (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()
1445 2009-03-20 Stephen White <senorblanco@chromium.org>
1447 Reviewed by Eric Seidel.
1449 Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
1450 on chromium/skia. The problem was that the gradient matrix
1451 for text was being applied twice. Fixed by reverting some of
1452 https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
1453 is no longer responsible for measuring the text and scaling up
1454 the gradient matrix. Instead, the text bounding box is passed
1455 in from SVGPaintServerGradient. I didn't make this change for CG,
1456 since it uses a different method (the gradient is drawn using the
1457 text as a pre-rendered mask).
1458 https://bugs.webkit.org/show_bug.cgi?id=24687
1460 * platform/graphics/skia/SkiaFontWin.cpp:
1461 (WebCore::skiaDrawText):
1462 * svg/graphics/SVGPaintServerGradient.cpp:
1463 (WebCore::SVGPaintServerGradient::setup):
1465 2009-03-20 Xan Lopez <xlopez@igalia.com>
1467 Rubber-stamped by Holger Freyther.
1469 There seems to be some rounding error in cairo (or in how we use
1470 cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
1471 report a height smaller than ascent + descent, which is wrong and
1472 confuses WebCore's layout system. Workaround this while we figure
1473 out what's going on.
1475 * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1476 (WebCore::SimpleFontData::platformInit):
1477 * platform/graphics/gtk/SimpleFontDataPango.cpp:
1478 (WebCore::SimpleFontData::platformInit):
1480 2009-03-19 Alexey Proskuryakov <ap@webkit.org>
1482 Reviewed by Darin Adler.
1484 https://bugs.webkit.org/show_bug.cgi?id=24122
1485 <rdar://problem/6674179>
1486 REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests
1488 Test: fast/dom/Range/deleted-range-endpoints.html
1490 * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
1491 to the specification.
1493 2009-03-19 Anders Carlsson <andersca@apple.com>
1495 Reviewed by Dan Bernstein.
1497 <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
1499 If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
1500 that object would never be updated.
1502 * page/FrameView.cpp:
1503 (WebCore::FrameView::updateWidgets):
1504 Factor the widget updating code out into this method. Return true if the update set is empty.
1506 (WebCore::FrameView::performPostLayoutTasks):
1507 Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
1511 2009-03-18 Timothy Hatcher <timothy@apple.com>
1513 Make the defered data loading timer honor the Page's scheduled runloop pairs.
1514 Introduces a new RunLoopTimer class that has an API mimicking Timer but
1515 allows it to be scheduled with one or more SchedulePairs.
1517 <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
1519 Reviewed by Darin Adler.
1521 * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
1522 * loader/MainResourceLoader.cpp:
1523 (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
1524 (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
1525 Mac platforms also schedule with the Page's SchedulePairs.
1526 (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
1527 (WebCore::MainResourceLoader::setDefersLoading): Ditto.
1528 * loader/MainResourceLoader.h:
1529 * platform/cf/RunLoopTimerCF.cpp: Added.
1530 (WebCore::RunLoopTimerBase::~RunLoopTimerBase):
1531 (WebCore::timerFired):
1532 (WebCore::RunLoopTimerBase::start):
1533 (WebCore::RunLoopTimerBase::schedule):
1534 (WebCore::RunLoopTimerBase::stop):
1535 (WebCore::RunLoopTimerBase::isActive):
1536 * platform/RunLoopTimer.h: Added.
1537 (WebCore::RunLoopTimerBase::RunLoopTimerBase):
1538 (WebCore::RunLoopTimerBase::startRepeating):
1539 (WebCore::RunLoopTimerBase::startOneShot):
1540 (WebCore::RunLoopTimer::RunLoopTimer):
1541 (WebCore::RunLoopTimer::fired):
1543 2009-03-19 Dimitri Glazkov <dglazkov@chromium.org>
1545 Reviewed by Darin Fisher.
1547 https://bugs.webkit.org/show_bug.cgi?id=24702
1548 Upstream miscellaneous bindings changes.
1550 * bindings/v8/ScheduledAction.cpp:
1551 (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
1552 * bindings/v8/ScriptCallStack.h: Added an extra include.
1554 2009-03-19 Simon Fraser <simon.fraser@apple.com>
1556 Reviewed by Dave Hyatt
1558 https://bugs.webkit.org/show_bug.cgi?id=24686
1560 When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
1561 we need to compare the computed z-offset with the depth-test z-offset before
1562 deciding that such a RenderLayer was hit. This fixes an issue, tested by the
1563 3d-point-mapping-overlapping.html test, where the child of a transformed element
1564 is found by hit testing, even when some other element with greater Z overlaps
1567 Improved the code by adding a utility method, isHitCandidate(), which computes and tests
1568 z-depth when necessary.
1570 Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
1571 transforms/3d/point-mapping/3d-point-mapping-overlapping.html
1573 * rendering/RenderLayer.cpp:
1574 (WebCore::isHitCandidate):
1575 (WebCore::RenderLayer::hitTestLayer):
1577 2009-03-19 Jeremy Moskovich <jeremy@chromium.org>
1579 Reviewed by Dimitri Glazkov.
1581 https://bugs.webkit.org/show_bug.cgi?id=24456
1582 Split ColorChromium.cpp into Mac & Windows variants.
1583 Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
1584 ultimately need to take a different approach. For now, createCGColor()
1585 is copied from ColorMac.mm.
1587 No observable change in behavior, so no test.
1589 * platform/graphics/chromium/ColorChromium.cpp:
1590 (WebCore::focusRingColor):
1591 * platform/graphics/chromium/ColorChromiumMac.mm: Added.
1593 2009-03-19 Pavel Feldman <pfeldman@chromium.org>
1595 Reviewed by Dimitri Glazkov.
1597 https://bugs.webkit.org/show_bug.cgi?id=24675
1598 Unforking frontend: add custom InspectorController methods
1601 * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
1603 2009-03-19 Jay Campan <jcampan@google.com>
1605 Reviewed by Dimitri Glazkov.
1607 https://bugs.webkit.org/show_bug.cgi?id=24625
1608 Adding an accessor to the currently selected index in the PopupMenuChromium.
1609 This is required for implementing the deletion of an autocomplete entry in Chromium.
1611 * platform/chromium/PopupMenuChromium.cpp:
1612 (WebCore::PopupContainer::selectedIndex):
1613 * platform/chromium/PopupMenuChromium.h:
1615 2009-03-19 Evan Stade <estade@chromium.org>
1617 Reviewed by Dimitri Glazkov.
1619 https://bugs.webkit.org/show_bug.cgi?id=24526
1620 Improve windows skia text stroking.
1622 Test: LayoutTests/svg/custom/struct-use-09-b.svg
1624 * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
1625 each font glyph polygon, rather than only closing the path once per
1626 letter. This fixes stroking for letters with multiple polygons, such
1628 (WebCore::getPathForGlyph):
1629 (WebCore::skiaDrawText):
1631 2009-03-19 Simon Hausmann <simon.hausmann@nokia.com>
1633 Reviewed by Tor Arne Vestbø.
1635 Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
1637 Removed dead code for distinguishing between Widget and PluginView in the Qt port.
1639 * bindings/js/ScriptControllerQt.cpp:
1640 (WebCore::ScriptController::createScriptInstanceForWidget): Removed incorrect isNPAPI check.
1641 * plugins/PluginView.cpp:
1642 (WebCore::PluginView::PluginView): Removed m_isNPAPIPlugin variable.
1643 * plugins/PluginView.h: Removed setter/getter.
1644 * plugins/mac/PluginViewMac.cpp:
1645 (WebCore::PluginView::init): Removed call to setIsNPAPIPlugin.
1646 * plugins/qt/PluginViewQt.cpp:
1647 (WebCore::PluginView::init): Ditto.
1649 2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
1651 Reviewed by Oliver Hunt.
1653 Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
1654 <https://bugs.webkit.org/show_bug.cgi?id=24596>
1655 <rdar://problem/6686493>
1657 JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
1658 JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
1659 set twice, once to the value that is illegal to access, and then to undefined
1660 This causes an assertion failure in property access caching code.
1662 The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
1664 * bindings/js/JSDOMWindowCustom.h:
1665 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1667 2009-03-18 Alexey Proskuryakov <ap@webkit.org>
1669 Reviewed by Sam Weinig.
1671 https://bugs.webkit.org/show_bug.cgi?id=24676
1672 Simple cross-origin requests shouldn't dispatch upload progress events
1674 Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
1676 * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
1677 explaining the somewhat unexpected behavior of this function.
1679 * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
1680 * xml/XMLHttpRequestUpload.h:
1681 Report whether there are any event listeners registered.
1683 * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
1685 * xml/XMLHttpRequest.cpp:
1686 (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
1687 (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
1688 (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
1689 (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
1690 non-empty for POST requests.
1691 (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
1692 (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
1693 (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
1694 (WebCore::XMLHttpRequest::networkError): Ditto.
1695 (WebCore::XMLHttpRequest::abortError): Ditto.
1696 (WebCore::XMLHttpRequest::didSendData): Ditto.
1698 2009-03-18 Marc-Antoine Ruel <maruel@chromium.org>
1700 Reviewed by Darin Fisher.
1702 https://bugs.webkit.org/show_bug.cgi?id=24398
1703 Fix a crash when loading a svg file in Chromium's test_shell and
1704 then reloading the page.
1706 * history/BackForwardListChromium.cpp:
1707 (WebCore::BackForwardList::BackForwardList):
1708 (WebCore::BackForwardList::close):
1710 2009-03-18 Eric Carlson <eric.carlson@apple.com>
1712 Reviewed by Simon Fraser.
1714 Fix for <rdar://problem/6685235>
1715 <video> element poster cannot be set dynamically if not originally set up in HTML
1717 Allocate the media engine immediately so the plug-in proxy is available for
1718 scripting right away.
1720 * platform/graphics/MediaPlayer.cpp:
1721 (WebCore::MediaPlayer::MediaPlayer):
1723 2009-03-18 Beth Dakin <bdakin@apple.com>
1725 Reviewed by Dave Hyatt.
1727 Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326):
1728 Popup menu appears at the wrong location on page at http://
1729 www.signonsandiego.com/
1731 This was a regression from http://trac.webkit.org/changeset/40769,
1732 which changed the base class of RenderInline to
1733 RenderBoxModelObject rather than RenderBox.
1735 * rendering/RenderObject.cpp:
1736 (WebCore::RenderObject::offsetParent): offsetParent should return a
1737 RenderBoxModelObject rather than just a RenderBox, which is more
1740 2009-03-18 Anders Carlsson <andersca@apple.com>
1742 Reviewed by Darin Adler.
1744 <rdar://problem/6504776>
1745 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
1747 Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
1749 * loader/NetscapePlugInStreamLoader.cpp:
1750 (WebCore::NetscapePlugInStreamLoader::didCancel):
1752 2009-03-18 David Levin <levin@chromium.org>
1754 Reviewed by Dimitri Glazkov.
1756 https://bugs.webkit.org/show_bug.cgi?id=24664
1757 Upstreaming v8 collection.h
1759 No change in behavior, so no test.
1761 * bindings/v8/V8Collection.h: Added.
1763 2009-03-18 Sam Weinig <sam@webkit.org>
1765 Reviewed by Simon Fraser.
1767 Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
1768 REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net
1769 <rdar://problem/6589657>
1771 Match the CSSOM spec for getClientRects and getBoundingClientRect by
1772 returning a 0x0 rect at the correct top/left position for empty inline
1775 * rendering/RenderInline.cpp:
1776 (WebCore::RenderInline::absoluteRects):
1777 (WebCore::RenderInline::absoluteQuads):
1779 2009-03-18 David Levin <levin@chromium.org>
1781 Reviewed by Eric Seidel.
1783 Match the changes done for windows in the bug
1784 https://bugs.webkit.org/show_bug.cgi?id=24530.
1786 No change in behavior, so no test.
1788 * rendering/RenderThemeChromiumLinux.cpp:
1789 (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1791 2009-03-18 Dirk Schulze <krit@webkit.org>
1793 Reviewed by Holger Freyther.
1795 Added support for SVG's stroked texts to Qt.
1797 [Qt] SVGs stroked text support missing
1798 https://bugs.webkit.org/show_bug.cgi?id=24262
1800 * platform/graphics/qt/FontQt.cpp:
1801 (WebCore::Font::drawComplexText):
1803 2009-03-18 Mark Rowe <mrowe@apple.com>
1805 Reviewed by Alexey Proskuryakov.
1807 Fix fast/encoding/char-decoding.html with recent ICU.
1809 * platform/text/TextCodecICU.cpp:
1810 (WebCore::TextCodecICU::decode): Look for gb18030 case-insensitively,
1811 as newer versions of ICU use GB18030 as the canonical name.
1813 2009-03-17 David Levin <levin@chromium.org>
1815 Reviewed by Dimitri Glazkov.
1817 https://bugs.webkit.org/show_bug.cgi?id=24662
1818 Chromium build fixes.
1820 Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
1821 the invalid implementation of ScriptCallStack.
1823 No change in behavior, so no test.
1825 * bindings/v8/ScriptCallStack.h:
1826 (WebCore::ScriptCallStack::state):
1827 * platform/graphics/skia/PlatformContextSkia.cpp:
1828 (PlatformContextSkia::drawRect):
1830 2009-03-17 David Carson <dacarson@apple.com>
1832 Reviewed by David Hyatt.
1834 Add anchor elements to the simple style sheet so that applications that
1835 are using WebKit just for simple text and links will also take advantage
1838 * css/CSSStyleSelector.cpp:
1839 (WebCore::elementCanUseSimpleDefaultStyle):
1841 2009-03-17 Darin Adler <darin@apple.com>
1843 Reviewed by Adele Peterson.
1845 <rdar://problem/6687005> Need support for new move-left/right selectors.
1847 * editing/EditorCommand.cpp:
1848 (WebCore::executeMoveToLeftEndOfLine): Added.
1849 (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Added.
1850 (WebCore::executeMoveToRightEndOfLine): Added.
1851 (WebCore::executeMoveToRightEndOfLineAndModifySelection): Added.
1852 Added command entries for the functions above.
1854 2009-03-17 Ojan Vafai <ojan@chromium.org>
1856 Reviewed by Adele Peterson.
1858 Put the padding inside scrollbars on textareas.
1859 https://bugs.webkit.org/show_bug.cgi?id=24370
1861 Put the padding inside the scrollbars on textareas. This is done by moving the
1862 overflow from the shadowNode to the RenderTextControlMultiline. As a result,
1863 all of the scroll handing methods that RenderTextControl overrides can be moved
1864 down into RenderTextControlSingleLine since RenderTextControlMultiline can now
1865 just use RenderBlock's versions. This also allows RenderTextControlMultiLine to
1866 no longer need a custom layout method since the shadowNode can now just size
1869 * css/CSSStyleSelector.cpp:
1870 (WebCore::CSSStyleSelector::adjustRenderStyle):
1871 * rendering/RenderTextControl.cpp:
1872 (WebCore::RenderTextControl::styleDidChange):
1873 (WebCore::RenderTextControl::selection):
1874 (WebCore::RenderTextControl::calcHeight):
1875 (WebCore::RenderTextControl::hitInnerTextElement):
1876 * rendering/RenderTextControl.h:
1877 * rendering/RenderTextControlMultiLine.cpp:
1878 (WebCore::RenderTextControlMultiLine::nodeAtPoint):
1879 (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
1880 * rendering/RenderTextControlMultiLine.h:
1881 * rendering/RenderTextControlSingleLine.cpp:
1882 (WebCore::RenderTextControlSingleLine::styleDidChange):
1883 (WebCore::RenderTextControlSingleLine::autoscroll):
1884 (WebCore::RenderTextControlSingleLine::scrollWidth):
1885 (WebCore::RenderTextControlSingleLine::scrollHeight):
1886 (WebCore::RenderTextControlSingleLine::scrollLeft):
1887 (WebCore::RenderTextControlSingleLine::scrollTop):
1888 (WebCore::RenderTextControlSingleLine::setScrollLeft):
1889 (WebCore::RenderTextControlSingleLine::setScrollTop):
1890 (WebCore::RenderTextControlSingleLine::scroll):
1891 * rendering/RenderTextControlSingleLine.h:
1892 * rendering/TextControlInnerElements.cpp:
1893 (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
1894 (WebCore::RenderTextControlInnerBlock::positionForPoint):
1895 (WebCore::TextControlInnerTextElement::createRenderer):
1897 2009-03-17 Darin Adler <darin@apple.com>
1899 Reviewed by David Hyatt.
1901 Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
1902 https://bugs.webkit.org/show_bug.cgi?id=24517
1904 * editing/DeleteButtonController.cpp:
1905 (WebCore::DeleteButtonController::enable): Added a call to updateRendering, since
1906 determining whether to display the delete button involves style and updateRendering
1907 also updates style (should probably be named updateStyle, in fact). Not needed to fix
1908 this bug, but would have prevented the crash that led to this bug in the first place.
1910 * editing/EditCommand.cpp:
1911 (WebCore::EditCommand::EditCommand): Get rid of unneeded null check. All frames have
1912 delete button controllers.
1913 * editing/Editor.cpp:
1914 (WebCore::Editor::rangeForPoint): Ditto.
1916 * editing/markup.cpp:
1917 (WebCore::appendStartMarkup): Changed a "&" to a "&&" so that generating markup
1918 doesn't depend on renderers at all when the convertBlocksToInlines boolean is false.
1919 This allows us to omit the call to updateLayoutIgnorePendingStylesheets in the
1920 createMarkup function that's called by innerHTML.
1921 (WebCore::MarkupAccumulator::appendMarkup): Turned this into a class with a member
1922 function. Added a feature where the accumulator will skip a node. Moved arguments
1923 that don't change during recursion into an object. This function still is a bit
1924 inefficient, since it creates a new HashMap at every level as it recurses, but for now
1925 I did not tackle that. Also replaced the onlyIncludeChildren boolean with EChildrenOnly
1926 for consistency and clarity.
1927 (WebCore::createMarkup): Removed the call to updateLayoutIgnorePendingStylesheets.
1928 Instead of calling disable/enable on the delete button controller's container element,
1929 pass it in to the markup accumulator as a node to skip.
1931 2009-03-17 Scott Violet <sky@google.com>
1933 Reviewed by Eric Seidel.
1935 https://bugs.webkit.org/show_bug.cgi?id=24651
1936 Skia does not always render text fill/stroke pattern/gradient/color correctly
1938 Changes Skia's font rendering to only render gradient/pattern if current
1939 color space indicates the gradient/pattern should be used.
1940 This is covered by LayoutTests/fast/canvas/canvas-text-alignment.html .
1942 * platform/graphics/GraphicsContext.cpp:
1943 (WebCore::GraphicsContext::strokeColorSpace):
1944 (WebCore::GraphicsContext::fillColorSpace):
1945 * platform/graphics/GraphicsContext.h:
1947 * platform/graphics/GraphicsContextPrivate.h:
1948 * platform/graphics/skia/SkiaFontWin.cpp:
1949 (WebCore::paintSkiaText):
1951 2009-03-17 Adele Peterson <adele@apple.com>
1953 Reviewed by Darin Adler.
1955 Fix for https://bugs.webkit.org/show_bug.cgi?id=24655
1956 <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message
1958 Test: editing/inserting/6633727.html
1960 This changes does a few things:
1961 1) Renames pos to insertionPosition.
1962 2) Eliminates "startNode". It doesn't work well to consider the node separately from the insertionPosition.
1963 The insertionPosition gets updated at various times, and it seems likely that startNode can get out of sync.
1964 3) Before building up a list of ancestors to move around when we insert the new block, make sure to use the deepest
1965 representation of the insertionPosition, so all ancestor nodes are correctly included.
1967 * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
1969 2009-03-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1971 Reviewed by Kevin Ollivier.
1973 https://bugs.webkit.org/show_bug.cgi?id=24115
1974 Introduce platform independent stubs for plugins.
1976 * plugins/PluginDataNone.cpp: Copied from WebCore/plugins/wx/PluginDataWx.cpp.
1977 * plugins/PluginPackageNone.cpp: Copied from WebCore/plugins/wx/PluginPackageWx.cpp.
1978 * plugins/PluginViewNone.cpp: Copied from WebCore/plugins/wx/PluginViewWx.cpp.
1979 * plugins/wx/PluginDataWx.cpp: Removed.
1980 * plugins/wx/PluginPackageWx.cpp: Removed.
1981 * plugins/wx/PluginViewWx.cpp: Removed.
1984 2009-03-17 Darin Adler <darin@apple.com>
1986 Earlier version reviewed by Adele Peterson.
1988 Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
1989 or push an <input type=button> or <button> causes the page to scroll down.
1991 Would be best to add a regression test for Windows eventually; tested that this has
1992 no effect on the Mac OS X platform.
1994 * html/HTMLInputElement.cpp:
1995 (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
1996 Use the code that calls the base class's defaultEventHandler early only in the cases
1997 where it's needed: keydown and keypress events in text fields. In other cases, do the
1998 more typical thing and call the default handler only at the end of the function.
1999 This function already had code to make sure the keypress event for space never gets
2000 through, but it was running too late since the scrolling code was moved into the
2001 base class default event handler.
2003 2009-03-17 Simon Fraser <simon.fraser@apple.com>
2005 Reviewed by Dave Hyatt
2007 https://bugs.webkit.org/show_bug.cgi?id=24632
2009 Fix repaint issues when composited layers come and go (only applies
2010 when ACCELERATED_COMPOSITING is turned on).
2012 * rendering/RenderLayer.cpp:
2013 (WebCore::RenderLayer::RenderLayer):
2014 * rendering/RenderLayer.h:
2015 (WebCore::RenderLayer::mustOverlayCompositedLayers):
2016 (WebCore::RenderLayer::setMustOverlayCompositedLayers):
2017 * rendering/RenderLayerBacking.cpp:
2018 (WebCore::RenderLayerBacking::RenderLayerBacking):
2019 * rendering/RenderLayerBacking.h:
2021 Move what used to be the 'forceCompositingLayer' flag from RenderLayerBacking
2022 to RenderLayer, because we don't want the side-effects of creating RenderLayerBacking
2023 when setting this flag.
2025 * rendering/RenderLayerCompositor.cpp:
2026 (WebCore::RenderLayerCompositor::updateLayerCompositingState):
2027 When a RenderLayer flips into or out of compositing mode, compute a repaint
2028 rect relative to the containerForRepaint, and repaint it.
2030 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2031 Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
2033 (WebCore::RenderLayerCompositor::needsToBeComposited):
2034 (WebCore::RenderLayerCompositor::requiresCompositingLayer):
2035 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
2036 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2037 * rendering/RenderLayerCompositor.h:
2039 Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
2040 and make it a class static method to match requiresCompositingForAnimation(). Both
2041 now take RenderObjects, rathern than RenderLayers.
2043 * rendering/style/RenderStyle.h:
2044 (WebCore::InheritedFlags::hasTransformRelatedProperty):
2045 Minor tidyup using convenience methods added in an earlier commit.
2047 2009-03-17 Simon Fraser <simon.fraser@apple.com>
2049 Reviewed by Darin Adler
2051 https://bugs.webkit.org/show_bug.cgi?id=24396
2054 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
2055 comments to make the #ifdefs more readable.
2057 * css/CSSComputedStyleDeclaration.cpp:
2058 (WebCore::computedTransform):
2059 Add a comment to mention that we don't flatten the matrix.
2061 * css/MediaQueryEvaluator.cpp:
2062 (WebCore::transform_3dMediaFeatureEval):
2063 Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
2066 * platform/graphics/mac/GraphicsLayerCA.mm:
2067 (WebCore::GraphicsLayerCA::animateTransform):
2068 No need for the #ifdef here. If we don't support 3d, we will have already flattened
2071 * platform/graphics/transforms/TransformationMatrix.cpp:
2072 (WebCore::TransformationMatrix::makeAffine):
2073 * platform/graphics/transforms/TransformationMatrix.h:
2074 New method to convert the matrix to an affine matrix by throwing a way the non-affine
2077 * rendering/RenderLayer.cpp:
2078 (WebCore::RenderLayer::updateTransform):
2079 (WebCore::RenderLayer::currentTransform):
2080 * rendering/RenderLayerBacking.cpp:
2081 (WebCore::RenderLayerBacking::updateLayerTransform):
2082 If 3d rendering is not supported, convert the matrix to an affine matrix
2083 which can be rendered, and used for hit testing.
2085 * rendering/RenderLayerCompositor.cpp:
2086 Change the name of the exported symbol that webkitdirs.pm uses to know if
2087 3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
2089 * rendering/RenderObject.cpp:
2090 (WebCore::RenderObject::transformFromContainer):
2091 Only take perspective into account if 3d rendering is supported.
2093 * rendering/RenderObject.h:
2094 (WebCore::makeMatrixRenderable):
2095 Utility method that flattens a matrix if 3d rendering is not supported.
2097 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
2099 wx build fix. Fix typo after mouse wheel changes.
2101 * platform/wx/MouseWheelEventWx.cpp:
2102 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2104 2009-03-17 Darin Adler <darin@apple.com>
2106 * inspector/ConsoleMessage.cpp:
2107 (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
2109 2009-03-17 Darin Adler <darin@apple.com>
2111 Fix crash seen right away when running run-webkit-tests.
2113 * inspector/ConsoleMessage.cpp:
2114 (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
2115 Also tweaked formatting a bit.
2117 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
2119 Reviewed by Darin Adler.
2121 HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so
2122 it doesn't need to zero it out before calling.
2124 * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
2126 2009-03-17 Dan Bernstein <mitz@apple.com>
2128 Reviewed by Adam Roben.
2130 - WebCore part of adding a mechanism for controlling the caching of
2131 responses through WebFrameLoaderClient
2133 Mac already has such a mechanism, and this adds one for CFNetwork ports.
2135 * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
2136 and ResourceLoaderCFNet.cpp.
2138 * loader/EmptyClients.h:
2139 (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
2140 implementation that always returns true.
2142 * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
2144 * loader/ResourceLoader.h: Ditto.
2146 * loader/cf/ResourceLoaderCFNet.cpp: Added.
2147 (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
2148 FrameLoaderClient::shouldCacheResponse().
2150 * platform/network/ResourceHandleClient.h:
2151 (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
2152 implementation that always returns true.
2154 * platform/network/cf/ResourceHandleCFNet.cpp:
2155 (WebCore::willCacheResponse): Added a call to
2156 ResourceHandleClient::shouldCacheResponse(). If the client returns
2157 false, return 0, which will prevent CFNetwork from caching the response.
2159 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
2161 Reviewed by Darin Adler.
2163 https://bugs.webkit.org/show_bug.cgi?id=13287
2164 Cannot change SELECT to a dynamically created option
2166 Tests: fast/forms/add-and-remove-option.html
2167 fast/forms/add-remove-option-modification-event.html
2168 fast/forms/add-selected-option.html
2169 fast/forms/select-cache-desynchronization.html
2171 * dom/ContainerNode.cpp:
2172 (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
2173 dispatching DOMSubtreeModified again, but the version should be incremented for event
2174 listeners to have an up to date view of the DOM.
2175 (WebCore::dispatchChildRemovalEvents): Ditto.
2177 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
2178 Make sure that the select element knows about its new selected option.
2180 * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
2181 because DOM also needs to be updated for forms that are not in document yet. Similar
2182 problems exist for node removing, but removedFromTree() is called at a wrong time, so
2183 those problems cannot be fixed without deeper refactoring.
2185 * html/HTMLSelectElement.cpp:
2186 (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
2187 doesn't make sense to keep the anchor after programmatically changing the selection, and
2188 keeping it was causing a failure in fast/forms/listbox-selection.html.
2190 * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
2191 base class versions.
2193 2009-03-17 Steve Falkenburg <sfalken@apple.com>
2195 <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
2197 Reviewed by Darin Adler.
2199 * loader/FTPDirectoryDocument.cpp:
2200 (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
2202 2009-03-16 David Hyatt <hyatt@apple.com>
2204 <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
2206 Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
2207 layers that don't paint themselves. This is done by adding a new enclosingSelfPaintingLayer method
2208 so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
2211 Reviewed by Darin Adler.
2213 Added fast/block/float/overlapping-floats-with-overflow-hidden.html
2216 * rendering/RenderBlock.cpp:
2217 (WebCore::RenderBlock::addOverhangingFloats):
2218 * rendering/RenderObject.cpp:
2219 (WebCore::RenderObject::enclosingSelfPaintingLayer):
2220 * rendering/RenderObject.h:
2222 2009-03-17 Xan Lopez <xlopez@igalia.com>
2224 Reviewed by Holger Freyther.
2226 https://bugs.webkit.org/show_bug.cgi?id=24592
2227 [GTK] Crash in FcPatternHash
2231 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2232 (WebCore::FontPlatformData::operator=):
2233 * platform/graphics/gtk/FontPlatformDataPango.cpp:
2235 2009-03-17 Xan Lopez <xlopez@igalia.com>
2237 Reviewed by Holger Freyther.
2239 https://bugs.webkit.org/show_bug.cgi?id=24592
2240 [GTK] Crash in FcPatternHash
2242 Sanitize memory management in pango fonts.
2244 Release memory allocated by FontPlatformDataPango in its own
2245 destructor instead of doing it from other classes, and add copy
2246 constructor and '=' operator to be able to track referenced
2249 * platform/graphics/gtk/FontPlatformDataPango.cpp:
2250 (WebCore::FontPlatformData::~FontPlatformData):
2251 (WebCore::FontPlatformData::operator=):
2252 (WebCore::FontPlatformData::FontPlatformData):
2253 * platform/graphics/gtk/SimpleFontDataPango.cpp:
2255 2009-03-17 Darin Adler <darin@apple.com>
2257 Reviewed by Alexey Proskuryakov.
2259 Bug 24624: Crash in imageLoadEventTimerFired after adoptNode used on <img>,
2260 seen with inspector, which uses adoptNode
2261 https://bugs.webkit.org/show_bug.cgi?id=24624
2262 rdar://problem/6422850
2264 Test: fast/dom/HTMLImageElement/image-load-cross-document.html
2267 (WebCore::Document::Document): Removed m_imageLoadEventTimer.
2268 (WebCore::Document::detach): Removed m_imageLoadEventDispatchSoonList and
2269 m_imageLoadEventDispatchingList.
2270 (WebCore::Document::implicitClose): Called ImageLoader::dispatchPendingLoadEvents
2271 instead of dispatchImageLoadEventsNow.
2273 * dom/Document.h: Removed ImageLoader, dispatchImageLoadEventSoon,
2274 dispatchImageLoadEventsNow, removeImage, m_imageLoadEventDispatchSoonList,
2275 m_imageLoadEventDispatchingList, m_imageLoadEventTimer, and imageLoadEventTimerFired.
2277 * loader/ImageLoader.cpp:
2278 (WebCore::loadEventSender): Added. Returns the single global ImageLoadEventSender
2279 object used privately as the target of the load event timer.
2280 (WebCore::ImageLoader::~ImageLoader): Call ImageLoadEventSender::cancelLoadEvent
2281 rather than Document::removeImage.
2282 (WebCore::ImageLoader::setImage): Use m_element directly, not element().
2283 (WebCore::ImageLoader::updateFromElement): Ditto. Also name the local variable
2284 document instead of doc.
2285 (WebCore::ImageLoader::notifyFinished): Call ImageLoadEventSender::dispatchLoadEventSoon
2286 rather than Document::dispatchImageLoadEventSoon.
2287 (WebCore::ImageLoader::dispatchPendingLoadEvent): Added. Handles the common logic
2288 about when load events can be dispatched so that dispatchLoadEvent only has to
2289 have the specific part for each derived class. This includes a check that the
2290 document is attached, which used to be handled by having documents empty out the
2291 image load event vectors in the detach function.
2292 (WebCore::ImageLoader::dispatchPendingLoadEvents): Added. Calls the appropriate
2293 function on the ImageLoadEventSender, which avoids the need to have that class be
2294 public in the ImageLoader header.
2295 (WebCore::ImageLoadEventSender::ImageLoadEventSender): Added. Has the code that
2296 was previously in the Document constructor.
2297 (WebCore::ImageLoadEventSender::dispatchLoadEventSoon): Added. Has the code that
2298 was previously in Document::dispatchImageLoadEventSoon.
2299 (WebCore::ImageLoadEventSender::cancelLoadEvent): Added. Has the code that was
2300 previously in Document::removeImage.
2301 (WebCore::ImageLoadEventSender::dispatchPendingLoadEvents): Added. Has the code
2302 that was previously in Document::dispatchImageLoadEventsNow.
2303 (WebCore::ImageLoadEventSender::timerFired): Added. Calls dispatchPendingLoadEvents.
2305 * loader/ImageLoader.h: Improved comments. Made the virtual functions private
2306 or protected rather than public. Added static dispatchPendingLoadEvents function
2307 for use by Document and private dispatchPendingLoadEvent function for use by
2308 ImageLoadEventSender. Made setLoadingImage private and eliminated
2309 setHaveFiredLoadEvent since that can all be done inside the class without any
2312 * html/HTMLImageLoader.cpp:
2313 (WebCore::HTMLImageLoader::dispatchLoadEvent): Removed logic to check whether a
2314 load event already fired and whether image() is 0. These are now both base class
2316 * svg/SVGImageLoader.cpp:
2317 (WebCore::SVGImageLoader::dispatchLoadEvent): Ditto.
2318 * wml/WMLImageLoader.cpp:
2319 (WebCore::WMLImageLoader::dispatchLoadEvent): Ditto.
2321 2009-03-17 Dimitri Glazkov <dglazkov@chromium.org>
2323 Reviewed by Timothy Hatcher.
2325 https://bugs.webkit.org/show_bug.cgi?id=24623
2326 Refactor ConsoleMessage to use ScriptFuncitonCall and eliminate JSC
2329 * bindings/js/ScriptFunctionCall.cpp:
2330 (WebCore::ScriptFunctionCall::appendArgument): Added uint and ScriptString-taking methods.
2331 * bindings/js/ScriptFunctionCall.h:
2332 * bindings/js/ScriptObjectQuarantine.cpp:
2333 (WebCore::quarantineValue): Added generic ScriptValue quarantine helper.
2334 * bindings/js/ScriptObjectQuarantine.h:
2335 * bindings/js/ScriptValue.cpp:
2336 (WebCore::ScriptValue::isEqual): Added.
2337 * bindings/js/ScriptValue.h:
2338 * inspector/ConsoleMessage.cpp:
2339 (WebCore::ConsoleMessage::ConsoleMessage):
2340 (WebCore::ConsoleMessage::addToConsole): Added.
2341 (WebCore::ConsoleMessage::isEqual): Changed to use ScriptValue::isEqual.
2342 * inspector/ConsoleMessage.h:
2343 (WebCore::ConsoleMessage::incrementCount): Added.
2344 * inspector/InspectorController.cpp:
2345 (WebCore::InspectorController::addConsoleMessage): Changed to use ConsoleMessage::addToConsole.
2346 (WebCore::InspectorController::populateScriptObjects): Ditto.
2347 * inspector/InspectorController.h:
2349 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
2351 Reviewed by Mark Rowe.
2353 Get BUILDING_ON_* defines from Platform.h.
2355 https://bugs.webkit.org/show_bug.cgi?id=24630
2359 2009-03-16 Xan Lopez <xlopez@igalia.com>
2361 Reviewed by Holger Freyther.
2363 https://bugs.webkit.org/show_bug.cgi?id=24592
2364 [GTK] Crash in FcPatternHash
2366 Sanitize memory management in gtk fonts.
2368 Release memory allocated by FontPlatformDataGtk in its own
2369 destructor instead of doing it from other classes, and add copy
2370 constructor and '=' operator to be able to track referenced
2373 * platform/graphics/gtk/FontPlatformData.h:
2374 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2375 (WebCore::FontPlatformData::operator=):
2376 (WebCore::FontPlatformData::FontPlatformData):
2377 (WebCore::FontPlatformData::~FontPlatformData):
2378 * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2379 (WebCore::SimpleFontData::platformDestroy):
2381 2009-03-17 Ariya Hidayat <ariya.hidayat@nokia.com>
2383 Build fix for Qt < 4.5.
2385 As reported by Yael Aharon <yael.aharon@nokia.com>
2387 * platform/graphics/qt/GraphicsContextQt.cpp:
2388 (WebCore::GraphicsContext::drawLine):
2390 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
2392 Reviewed by Sam Weinig.
2394 https://bugs.webkit.org/show_bug.cgi?id=24614
2395 Access control checks are different in cached and uncached cases
2397 Test: http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html
2399 * loader/CrossOriginAccessControl.cpp:
2400 (WebCore::isOnAccessControlSimpleRequestMethodWhitelist): Factored out simple method
2401 check for use in both cached and uncached cases. In cached case, an old definition that
2402 omitted HEAD was still used.
2403 (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Check that content type has an
2404 allowed value. This is needed in all call sites. Also changed to compare MIME type, not
2406 (WebCore::isSimpleCrossOriginAccessRequest): Use the above methods.
2408 * loader/CrossOriginAccessControl.h: Expose isOnAccessControlSimpleRequestMethodWhitelist.
2410 * loader/CrossOriginPreflightResultCache.cpp:
2411 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
2412 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2413 Use the new checks for simple method and header.
2415 2009-03-16 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2417 Reviewed by Mark Rowe.
2419 https://bugs.webkit.org/show_bug.cgi?id=24638
2420 [GTK] HTML5 media tags do not work
2422 Add a repaint-requested signal to the video sink, and use it to
2423 call MediaPlayerPrivate::repaint, so that the video actually
2426 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2427 (WebCore::mediaPlayerPrivateRepaintCallback):
2428 (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2429 * platform/graphics/gtk/VideoSinkGStreamer.cpp:
2430 (webkit_video_sink_idle_func):
2431 (webkit_video_sink_render):
2432 (webkit_video_sink_class_init):
2434 2009-03-16 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2436 Reviewed by Holger Freyther.
2438 https://bugs.webkit.org/show_bug.cgi?id=24638
2439 [GTK] HTML5 media tags do not work
2441 Work-around the fact that gst_element_query_duration returns true even
2442 though it is unable to figure out the duration when in stream (push)
2445 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2446 (WebCore::MediaPlayerPrivate::duration):
2448 2009-03-16 Darin Adler <darin@apple.com>
2450 Reviewed by Kevin Decker.
2452 <rdar://problem/6642742> Top Sites malfunction when switching text zoom mode
2455 (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is
2456 currently showing a non-HTML view.
2458 2009-03-16 Darin Adler <darin@apple.com>
2460 Reviewed by Adele Peterson.
2462 Bug 24629: moving forward or backward a paragraph fails at edge of document
2463 https://bugs.webkit.org/show_bug.cgi?id=24629
2464 rdar://problem/6544413
2466 Test: editing/selection/move-paragraph-document-edges.html
2468 * editing/visible_units.cpp:
2469 (WebCore::previousParagraphPosition): Use the last result from
2470 previousLinePosition rather than going all the way back to what was originally
2471 passed in when we hit exception cases like null or not moving. This correctly
2472 inherits the behavior of previousLinePosition when we are in a paragraph at the
2474 (WebCore::nextParagraphPosition): Ditto.
2476 2009-03-16 Darin Adler <darin@apple.com>
2478 Reviewed by Adele Peterson.
2480 Bug 24619: RenderObject::selectionStartEnd does not need to be a virtual function
2481 https://bugs.webkit.org/show_bug.cgi?id=24619
2483 * rendering/RenderObject.h: Remove virtual keyword from selectionStartEnd declaration.
2484 * rendering/RenderView.h: Ditto.
2486 2009-03-16 Peter Kasting <pkasting@google.com>
2488 Reviewed by David Hyatt.
2490 https://bugs.webkit.org/show_bug.cgi?id=24368
2491 DOM scroll events should be based off the actual number of wheel
2492 ticks, not off the number of lines scrolled. This matches IE.
2495 (WebCore::Node::dispatchWheelEvent):
2496 * dom/WheelEvent.cpp:
2497 (WebCore::WheelEvent::WheelEvent):
2499 (WebCore::WheelEvent::create):
2500 * platform/PlatformWheelEvent.h:
2501 (WebCore::PlatformWheelEvent::wheelTicksX):
2502 (WebCore::PlatformWheelEvent::wheelTicksY):
2503 * platform/gtk/WheelEventGtk.cpp:
2504 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2505 * platform/mac/WheelEventMac.mm:
2506 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2507 * platform/qt/WheelEventQt.cpp:
2508 * platform/win/WheelEventWin.cpp:
2509 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2510 * platform/wx/MouseWheelEventWx.cpp:
2511 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2513 2009-03-16 Simon Fraser <simon.fraser@apple.com>
2515 Reviewed by Eric Seidel
2517 Clean up a few issues in the Animation code:
2519 * page/animation/AnimationBase.cpp:
2520 (WebCore::AnimationBase::updateStateMachine):
2523 (WebCore::AnimationBase::willNeedService):
2524 Don't round to float, use std::max
2526 * page/animation/AnimationController.cpp:
2527 (WebCore::AnimationControllerPrivate::startTimeResponse):
2528 Fix erroneously copied line to null out m_lastResponseWaiter.
2530 2009-03-12 David Hyatt <hyatt@apple.com>
2532 Reviewed by Eric Seidel
2534 https://bugs.webkit.org/show_bug.cgi?id=13632
2536 Overflow scrolling needs to account for the bottom/right padding on the object itself as well
2537 as for bottom/right margins on children.
2539 Existing tests cover this.
2541 * rendering/RenderBlock.cpp:
2542 (WebCore::RenderBlock::lowestPosition):
2543 (WebCore::RenderBlock::rightmostPosition):
2545 2009-03-16 Sam Weinig <sam@webkit.org>
2547 Reviewed by Anders Carlsson.
2549 Fix for <rdar://problem/6320555>
2550 Add an upper limit for setting HTMLSelectElement.length.
2552 Test: fast/forms/select-max-length.html
2554 * html/HTMLSelectElement.cpp:
2555 (WebCore::HTMLSelectElement::setOption):
2556 (WebCore::HTMLSelectElement::setLength):
2558 2009-03-16 Eric Carlson <eric.carlson@apple.com>
2560 Reviewed by Simon Fraser.
2562 <rdar://problem/6686721> Media document crash in 64-bit WebKit
2564 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2565 (WebCore::MediaPlayerPrivate::createQTMovieView): QTMovieContentViewClass is only used when
2566 rendering inline with old versions of QuickTime, so don't look for it when we are in a
2569 2009-03-16 Dimitri Glazkov <dglazkov@chromium.org>
2571 Reviewed by Timothy Hatcher.
2573 https://bugs.webkit.org/show_bug.cgi?id=24590
2574 Refactor InspectorDOMStorageResource to use ScriptFunctionCall.
2576 * bindings/js/ScriptFunctionCall.cpp:
2577 (WebCore::ScriptFunctionCall::appendArgument): Added method for bool argument.
2578 * bindings/js/ScriptFunctionCall.h: Ditto, also cleaned up.
2579 * bindings/js/ScriptObjectQuarantine.cpp:
2580 (WebCore::getQuarantinedScriptObject): Added Storage helper.
2581 * bindings/js/ScriptObjectQuarantine.h: Ditto.
2582 * inspector/InspectorController.cpp:
2583 (WebCore::InspectorController::populateScriptObjects): Changed to use bind method.
2584 (WebCore::InspectorController::resetScriptObjects): Changed to use unbind method.
2585 (WebCore::InspectorController::didUseDOMStorage): Changed to use isSameHostAndType and bind methods.
2586 * inspector/InspectorController.h: Removed add/remove methods for DOM storage.
2587 * inspector/InspectorDOMStorageResource.cpp:
2588 (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
2589 (WebCore::InspectorDOMStorageResource::isSameHostAndType): Added.
2590 (WebCore::InspectorDOMStorageResource::bind): Added.
2591 (WebCore::InspectorDOMStorageResource::unbind): Added.
2592 * inspector/InspectorDOMStorageResource.h:
2594 2009-03-16 Mike Belshe <mike@belse.com>
2596 Reviewed by Dimitri Glazkov.
2598 https://bugs.webkit.org/show_bug.cgi?id=24580
2599 Fix query() to match KURL behavior, this time with the code that
2602 * platform/KURLGoogle.cpp:
2603 (WebCore::KURL::query): Fix copy/paste mistake.
2605 2009-03-16 Alexey Proskuryakov <ap@webkit.org>
2607 Reviewed by Darin Adler.
2609 https://bugs.webkit.org/show_bug.cgi?id=21752
2610 REGRESSION: referencing XHR constructor for a not yet loaded frame permanently breaks it
2612 Test: fast/dom/Window/window-early-properties-xhr.html
2614 For some transitions, the Window object is not replaced, but Document is. When this happened,
2615 window.document property was updated, but references to Document kept in cached constructors
2618 * bindings/js/JSAudioConstructor.cpp:
2619 (WebCore::JSAudioConstructor::JSAudioConstructor):
2620 (WebCore::JSAudioConstructor::document):
2621 (WebCore::JSAudioConstructor::mark):
2622 * bindings/js/JSAudioConstructor.h:
2623 * bindings/js/JSImageConstructor.cpp:
2624 (WebCore::JSImageConstructor::JSImageConstructor):
2625 (WebCore::JSImageConstructor::document):
2626 (WebCore::JSImageConstructor::mark):
2627 * bindings/js/JSImageConstructor.h:
2628 * bindings/js/JSMessageChannelConstructor.cpp:
2629 (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
2630 (WebCore::JSMessageChannelConstructor::scriptExecutionContext):
2631 (WebCore::JSMessageChannelConstructor::mark):
2632 * bindings/js/JSMessageChannelConstructor.h:
2633 * bindings/js/JSOptionConstructor.cpp:
2634 (WebCore::JSOptionConstructor::JSOptionConstructor):
2635 (WebCore::JSOptionConstructor::document):
2636 (WebCore::JSOptionConstructor::mark):
2637 * bindings/js/JSOptionConstructor.h:
2638 * bindings/js/JSXMLHttpRequestConstructor.cpp:
2639 (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
2640 (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
2641 (WebCore::JSXMLHttpRequestConstructor::mark):
2642 * bindings/js/JSXMLHttpRequestConstructor.h:
2643 Changed cached constructors to keep a reference to Window, not Document.
2645 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
2647 Reviewed by Darin Adler.
2649 https://bugs.webkit.org/show_bug.cgi?id=24549
2650 Impose a limit on Access-Control-Max-Age value
2652 * loader/CrossOriginPreflightResultCache.cpp:
2653 (WebCore::CrossOriginPreflightResultCacheItem::parse):
2655 2009-03-15 Greg Bolsinga <bolsinga@apple.com>
2657 Reviewed by David Kilzer.
2659 <rdar://problem/6668875> Normalize Geolocation results
2661 * platform/mac/GeolocationServiceMac.mm:
2662 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
2664 2009-03-15 Greg Bolsinga <bolsinga@apple.com>
2666 Reviewed by David Kilzer.
2668 Update ::toString format as suggested by Darin Adler.
2670 * page/Geoposition.cpp:
2671 (WebCore::Geoposition::toString):
2673 2009-03-15 David Kilzer <ddkilzer@apple.com>
2675 <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
2677 Reviewed by Darin Adler.
2679 Yet another case where we would trigger extended encoding loading needlessly.
2681 * platform/text/TextEncoding.cpp:
2682 (WebCore::TextEncoding::encodingForFormSubmission):
2684 2009-03-15 Simon Fraser <simon.fraser@apple.com>
2686 Build fix: no review.
2688 * rendering/style/ContentData.h:
2690 2009-03-15 David Kilzer <ddkilzer@apple.com>
2692 Bug 24542: Improve ContentData encapsulation
2694 <https://bugs.webkit.org/show_bug.cgi?id=24542>
2696 Reviewed by Simon Fraser.
2698 No tests since there is no change in behavior.
2700 * rendering/RenderObject.cpp:
2701 (WebCore::RenderObject::createObject): Used getter methods
2702 instead of data members on ContentData class. Used isImage()
2704 * rendering/RenderObjectChildList.cpp:
2705 (WebCore::RenderObjectChildList::updateBeforeAfterContent): Ditto.
2707 * rendering/style/ContentData.cpp:
2708 (WebCore::ContentData::clear): Extracted code into
2709 deleteContent() method.
2710 (WebCore::ContentData::dataEquivalent): Added. Extracted code
2711 from StyleRareNonInheritedData::contentDataEquivalent().
2712 (WebCore::ContentData::deleteContent): Added. Used by setter
2714 * rendering/style/ContentData.h: Made m_type, m_content and
2716 (WebCore::ContentData::isCounter): Added.
2717 (WebCore::ContentData::isImage): Added.
2718 (WebCore::ContentData::isNone): Added.
2719 (WebCore::ContentData::isText): Added.
2720 (WebCore::ContentData::type): Added.
2721 (WebCore::ContentData::dataEquivalent): Added.
2722 (WebCore::ContentData::image): Added.
2723 (WebCore::ContentData::setImage): Added.
2724 (WebCore::ContentData::text): Added.
2725 (WebCore::ContentData::setText): Added.
2726 (WebCore::ContentData::counter): Added.
2727 (WebCore::ContentData::setCounter): Added.
2728 (WebCore::ContentData::next): Added.
2729 (WebCore::ContentData::setNext): Added.
2731 * rendering/style/CounterContent.h:
2732 (WebCore::operator!=): Removed.
2733 (WebCore::operator==): Renamed operator!=() and reversed its
2734 logic after extracting code from
2735 StyleRareNonInheritedData::contentDataEquivalent() to create
2736 ContentData::dataEquivalent().
2738 * rendering/style/RenderStyle.cpp:
2739 (WebCore::RenderStyle::setContent): Used new getters and setters
2740 on ContentData class. Changed first argument from a StringImpl*
2741 to a PassRefPtr<StrimgImpl>. Used isText() convenience method.
2742 * rendering/style/RenderStyle.h:
2743 (WebCore::RenderStyle::setContent): Updated declaration.
2744 * rendering/style/StyleRareNonInheritedData.cpp:
2745 (WebCore::StyleRareNonInheritedData::contentDataEquivalent):
2746 Extracted most logic in while() loop into
2747 ContentData::dataEquivalent().
2749 2009-03-15 Gustavo Noronha Silva <gns@gnome.org>
2751 Reviewed by Anders Carlsson.
2753 https://bugs.webkit.org/show_bug.cgi?id=24602
2754 [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
2756 Reintroduce the URI into the soup message after having set it in
2757 the KURL, on redirects, to make sure it is properly encoded. This
2758 fixes bad request problems when servers give bad URIs on their
2759 response's Location header.
2761 * platform/network/soup/ResourceHandleSoup.cpp:
2762 (WebCore::restartedCallback):
2764 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
2766 Reviewed by Darin Adler.
2768 https://bugs.webkit.org/show_bug.cgi?id=19737
2769 No cursor and paste not enabled right clicking text field/area
2771 Test: fast/events/right-click-focus.html
2773 * page/EventHandler.cpp:
2774 (WebCore::EventHandler::handleMousePressEventSingleClick):
2775 (WebCore::EventHandler::handleMousePressEvent):
2776 Take normal code path for right clicks (we were taking it for Ctrl-clicks anyway).
2778 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
2780 Reviewed by Adele Peterson.
2782 https://bugs.webkit.org/show_bug.cgi?id=23949
2783 HTMLSelectElement is in inconsistent state when handling mutation events
2785 Test: fast/forms/mutation-event-recalc.html
2787 * dom/ContainerNode.cpp:
2788 (WebCore::ContainerNode::insertBefore):
2789 (WebCore::ContainerNode::appendChild):
2790 Call childrenChanged() before dispatching modification events, not after.
2792 * html/HTMLOptGroupElement.cpp:
2793 (WebCore::HTMLOptGroupElement::insertBefore):
2794 (WebCore::HTMLOptGroupElement::replaceChild):
2795 (WebCore::HTMLOptGroupElement::removeChild):
2796 (WebCore::HTMLOptGroupElement::appendChild):
2797 (WebCore::HTMLOptGroupElement::removeChildren):
2798 * html/HTMLSelectElement.cpp:
2799 (WebCore::HTMLSelectElement::add):
2800 (WebCore::HTMLSelectElement::remove):
2801 (WebCore::HTMLSelectElement::insertBefore):
2802 (WebCore::HTMLSelectElement::replaceChild):
2803 (WebCore::HTMLSelectElement::removeChild):
2804 (WebCore::HTMLSelectElement::appendChild):
2805 (WebCore::HTMLSelectElement::removeChildren):
2806 Remove calls to recalcSelectOptions(). It is too late to recalc now, after mutation events
2807 were already dispatched.
2809 2009-03-14 Greg Bolsinga <bolsinga@apple.com>
2811 <rdar://problem/6683465>
2813 Geolocation has to be able to handle NULL Frames.
2815 Reviewed by Mark Rowe
2817 2009-03-14 Greg Bolsinga <bolsinga@apple.com>
2819 Reviewed by David Kilzer.
2821 Geoposition::toString was missing the Coordinates after the update.
2823 * page/Geoposition.cpp:
2824 (WebCore::Geoposition::toString):
2826 2009-03-14 Jan Michael Alonzo <jmalonzo@webkit.org>
2828 Reviewed by Mark Rowe.
2830 [Gtk] Build fix - pass a Coordinate to Geoposition::create
2831 https://bugs.webkit.org/show_bug.cgi?id=24603
2833 Gtk build fix per r41650
2834 https://bugs.webkit.org/show_bug.cgi?id=24506
2835 Geolocation in Safari differs from the spec, no Coordinates attribute on Position
2837 Pass a Coordinate to Geoposition::create.
2839 * platform/gtk/GeolocationServiceGtk.cpp:
2840 (WebCore::GeolocationServiceGtk::updatePosition):
2842 2009-03-14 Alexey Proskuryakov <ap@webkit.org>
2844 Reviewed by Darin Adler.
2846 https://bugs.webkit.org/show_bug.cgi?id=24545
2847 Make cross-site XHR simple request definition match current spec draft
2849 Tests: http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type.html
2850 http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html
2852 * loader/CrossOriginAccessControl.cpp:
2853 (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Added Content-Language.
2854 (WebCore::isSimpleCrossOriginAccessRequest): Added HEAD. Restricted content types to those
2855 that could be sent via form submission.
2857 2009-03-14 Alexey Proskuryakov <ap@webkit.org>
2859 Reviewed by Darin Adler.
2861 https://bugs.webkit.org/show_bug.cgi?id=15172
2862 object fallback - empty string for first argument of setAttributeNS does not work like null
2864 https://bugs.webkit.org/show_bug.cgi?id=24548
2865 createElementNS("", name) should create an element in null namespace
2867 Tests: fast/dom/createElementNS-empty-namespace.html
2868 fast/dom/setAttributeNS-empty-namespace.html
2870 * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2871 Convert empty namespaces to null.
2873 2009-03-13 Mark Rowe <mrowe@apple.com>
2875 Rubber-stamped by Dan Bernstein.
2877 Take advantage of the ability of recent versions of Xcode to easily switch the active
2880 * Configurations/DebugRelease.xcconfig:
2882 2009-03-13 John Abd-El-Malek <jam@google.com>
2884 Reviewed by Darin Fisher.
2886 https://bugs.webkit.org/show_bug.cgi?id=24593
2887 Added requestorID so we can track the request to its WebView without using frame (which was removed).
2889 * platform/network/chromium/ResourceRequest.h:
2890 (WebCore::ResourceRequest::ResourceRequest):
2891 (WebCore::ResourceRequest::requestorID):
2892 (WebCore::ResourceRequest::setRequestorID):
2893 (WebCore::ResourceRequest::setTargetType):
2894 (WebCore::ResourceRequest::policyURL):
2895 (WebCore::ResourceRequest::setPolicyURL):
2896 (WebCore::ResourceRequest::requestorPid):
2897 (WebCore::ResourceRequest::setRequestorPid):
2899 2009-03-13 Mike Belshe <mike@belshe.com>
2901 Reviewed by Dimitri Glazkov.
2903 https://bugs.webkit.org/show_bug.cgi?id=24561
2904 Add custom V8 bindings for HTMLElementCanvas, Location.
2906 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
2907 * bindings/v8/custom/V8LocationCustom.cpp: Added.
2909 2009-03-13 Stephen White <senorblanco@chromium.org>
2911 Reviewed by Eric Seidel.
2913 https://bugs.webkit.org/show_bug.cgi?id=24584
2915 Fix transparent text rendering on Chromium. FontChromiumWin
2916 was calling beginTransparencyLayer()/endTransparencyLayer(), with
2917 a TransparencyWin inside to do GDI ClearType rendering over an
2918 opaque background. TransparencyWin does its special sauce
2919 in the destructor, but it was being called too late to be used
2920 correctly in the layer. Put the special sauce into a new function,
2921 composite(), and call that explicitly instead.
2923 * platform/graphics/chromium/FontChromiumWin.cpp:
2924 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
2925 * platform/graphics/chromium/TransparencyWin.cpp:
2926 (WebCore::TransparencyWin::~TransparencyWin):
2927 (WebCore::TransparencyWin::composite):
2928 (WebCore::TransparencyWin::init):
2929 * platform/graphics/chromium/TransparencyWin.h:
2930 * rendering/RenderThemeChromiumWin.cpp:
2933 2009-03-13 Mike Belshe <mike@belshe.com>
2935 Reviewed by Dimitri Glazkov.
2937 https://bugs.webkit.org/show_bug.cgi?id=24562
2938 Add custom implementation for getCSSCanvasContext to V8 bindings.
2940 * bindings/v8/custom/V8DocumentCustom.cpp: Added new method.
2942 2009-03-13 Mike Belshe <mike@belse.com>
2944 Reviewed by Dimitri Glazkov.
2946 https://bugs.webkit.org/show_bug.cgi?id=24580
2947 Fix query() to match KURL behavior.
2949 * platform/KURLGoogle.cpp:
2950 (WebCore::KURL::query): remove extra logic around question mark.
2952 2009-03-13 Chris Fleizach <cfleizach@apple.com>
2954 Reviewed by Beth Dakin.
2956 Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
2957 https://bugs.webkit.org/show_bug.cgi?id=24474
2959 Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
2961 * page/AccessibilityTable.cpp:
2962 (WebCore::AccessibilityTable::cellForColumnAndRow):
2964 2009-03-13 Jian Li <jianli@chromium.org>
2966 Reviewed by Dimitri Glazkov.
2968 https://bugs.webkit.org/show_bug.cgi?id=24589
2969 Upstream changes to V8 event listeners (Chromium r11133) in order to
2970 fix worker functionality break in Chromium.
2972 * bindings/v8/V8AbstractEventListener.cpp:
2973 (WebCore::V8AbstractEventListener::invokeEventHandler):
2974 (WebCore::V8AbstractEventListener::handleEvent):
2975 * bindings/v8/V8AbstractEventListener.h:
2976 * bindings/v8/V8WorkerContextEventListener.cpp:
2977 (WebCore::V8WorkerContextEventListener::handleEvent):
2979 2009-03-13 Dimitri Glazkov <dglazkov@chromium.org>
2981 Reviewed by Timothy Hatcher.
2983 https://bugs.webkit.org/show_bug.cgi?id=24524
2984 Introduce ScriptObject and ScriptFunctionCall abstractions.
2986 * GNUmakefile.am: Added ScriptObject and ScriptFunctionCall to project.
2987 * WebCore.pro: Ditto.
2988 * WebCore.vcproj/WebCore.vcproj: Ditto.
2989 * WebCore.xcodeproj/project.pbxproj: Ditto.
2990 * WebCoreSources.bkl: Ditto.
2991 * bindings/js/ScriptFunctionCall.cpp: Added.
2992 * bindings/js/ScriptFunctionCall.h: Added.
2993 * bindings/js/ScriptObject.cpp: Added.
2994 * bindings/js/ScriptObject.h: Added.
2995 * bindings/js/ScriptObjectQuarantine.cpp: Added.
2996 * bindings/js/ScriptObjectQuarantine.h: Added.
2997 * inspector/InspectorController.cpp:
2998 (WebCore::InspectorController::populateScriptObjects): Changed to use InspectorDatabaseResource::bind.
2999 (WebCore::InspectorController::resetScriptObjects): Changed to use InspectorDatabaseResource::unbind.
3000 (WebCore::InspectorController::didOpenDatabase): Changed to use InspectorDatabaseResource::unbind.
3001 * inspector/InspectorController.h: Removed addScriptDatabaseResource and
3002 removeScriptDatabaseResource declarations.
3003 * inspector/InspectorDatabaseResource.cpp:
3004 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
3005 (WebCore::InspectorDatabaseResource::bind): Added.
3006 (WebCore::InspectorDatabaseResource::unbind): Added.
3007 * inspector/InspectorDatabaseResource.h: Added bind and unbind declarations.
3009 2009-03-13 Peter Kasting <pkasting@google.com>
3011 Reviewed by Eric Seidel.
3013 https://bugs.webkit.org/show_bug.cgi?id=24467
3014 Make Skia drawRect() and stroke behavior match CG.
3016 This makes drawRect() ignore the stroke width (like CG does), and
3017 adds a warning comment about that to the appropriate header.
3019 It also eliminates some hacky code in Skia's stroke preparation,
3020 which tried to adjust odd-width strokes to fall on pixel boundaries.
3021 Not only did this not match CG, it wouldn't necessarily work right,
3022 because there could be other transforms (e.g. full-page zoom) that
3023 would affect the stroke before it reached the device pixel level.
3025 * platform/graphics/GraphicsContext.h:
3026 * platform/graphics/skia/GraphicsContextSkia.cpp:
3027 (WebCore::GraphicsContext::drawRect):
3028 (WebCore::GraphicsContext::fillRect):
3029 * platform/graphics/skia/PlatformContextSkia.cpp:
3030 (PlatformContextSkia::drawRect):
3031 (PlatformContextSkia::setupPaintForStroking):
3033 2009-03-13 Jian Li <jianli@chromium.org>
3035 Reviewed by Dimitri Glazkov.
3037 https://bugs.webkit.org/show_bug.cgi?id=24583
3038 Need to change scope of constructor and destructor of V8ObjectEventListener from private
3039 to protected so that they could be used in its derived class V8WorkerContextEventListener.
3041 * bindings/v8/V8ObjectEventListener.h:
3043 2009-03-13 David Levin <levin@chromium.org>
3045 Reviewed by Dimitri Glazkov.
3047 https://bugs.webkit.org/show_bug.cgi?id=24579
3048 Many V8*Event* files are misplaced.
3050 This code is infrastructure for supporting the bindings and thus should
3051 be in the bindings/v8 directory.
3053 * bindings/v8/V8AbstractEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.cpp.
3054 * bindings/v8/V8AbstractEventListener.h: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.h.
3055 * bindings/v8/V8LazyEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.cpp.
3056 * bindings/v8/V8LazyEventListener.h: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.h.
3057 * bindings/v8/V8ObjectEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.cpp.
3058 * bindings/v8/V8ObjectEventListener.h: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.h.
3059 * bindings/v8/V8WorkerContextEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.cpp.
3060 * bindings/v8/V8WorkerContextEventListener.h: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.h.
3062 2009-03-13 Adele Peterson <adele@apple.com>
3064 Reviewed by Justin Garcia.
3066 Fix for <rdar://problem/5089327> Color of quoted content is wrong when pasted inside other quoted content
3068 Test: editing/pasteboard/5089327.html
3070 Handle spans being pasted within a quoted region in the same way we handle "paste as quotation" content.
3072 * editing/ReplaceSelectionCommand.cpp:
3073 (WebCore::handleStyleSpansBeforeInsertion):
3074 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
3076 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
3078 Reviewed by Simon Fraser.
3080 Update Geolocation perimission dialogs to be asynchronous.
3081 https://bugs.webkit.org/show_bug.cgi?id=24505
3083 Geolocation now requests permission from the Chrome asynchronously.
3084 The Chrome is passed the Geolocation object, and the Chrome sets the permission
3085 on the Geolocation. Geolocation also tracks if the Chrome should clear its cache
3086 of SecurityOrigins with geolocation permission. This is so that the GeolocationService
3087 can inform the Chrome of its request, and the Chrome is also free to implement its
3091 * WebCore.xcodeproj/project.pbxproj:
3093 (WebCore::Chrome::requestGeolocationPermissionForFrame):
3095 * page/ChromeClient.h:
3096 (WebCore::ChromeClient::requestGeolocationPermissionForFrame):
3097 * page/Geolocation.cpp:
3098 (WebCore::Geolocation::Geolocation):
3099 (WebCore::Geolocation::getCurrentPosition):
3100 (WebCore::Geolocation::watchPosition):
3101 (WebCore::Geolocation::setIsAllowed):
3102 (WebCore::Geolocation::displayChallengeIfNecessary):
3103 (WebCore::Geolocation::geolocationServicePositionChanged):
3104 * page/Geolocation.h:
3105 (WebCore::Geolocation::isAllowed):
3106 (WebCore::Geolocation::setShouldClearCache):
3107 (WebCore::Geolocation::shouldClearCache):
3108 (WebCore::Geolocation::):
3110 2009-03-13 Anders Carlsson <andersca@apple.com>
3112 Reviewed by Dan Bernstein.
3114 <rdar://problem/6610666> Revise the Cocoa event model text API
3116 Add a NPCocoaEventTextInput event type. Remove the text input variables.
3121 2009-03-13 Kevin Decker <kdecker@apple.com>
3125 <rdar://problem/6630340> REGRESSION (39114-39115): Unity Web Player no longer works if Flip4Mac is also installed
3127 The code assumed if we have a plug-in that supports "application/x-oleobject" we should always prefer the object tag
3128 over of an embed tag. That assumption can cause the Mac platform to load the wrong plug-in, as Flip4Mac claims supports
3131 * rendering/RenderPartObject.cpp:
3132 (WebCore::shouldUseEmbedDescendant): Made the Mac platform always return true here.
3134 2009-03-13 Jian Li <jianli@chromium.org>
3136 Reviewed by Dimitri Glazkov.
3138 https://bugs.webkit.org/show_bug.cgi?id=24559
3139 Need to port JSC fix (r41565) to V8 in order to fix layout test onload-single-line-comment.html.
3141 * bindings/v8/custom/V8LazyEventListener.cpp:
3142 (WebCore::V8LazyEventListener::getListenerFunction):
3143 (WebCore::V8LazyEventListener::getWrappedListenerFunction):
3145 2009-03-13 Jian Li <jianli@chromium.org>
3147 Reviewed by Dimitri Glazkov.
3149 https://bugs.webkit.org/show_bug.cgi?id=24557
3150 This is to support running multiple workers in a single worker process in chromium.
3152 * bindings/v8/custom/V8WorkerContextEventListener.cpp:
3153 (WebCore::V8WorkerContextEventListener::handleEvent):
3154 Add locker to v8 event listener of worker context.
3156 2009-03-13 Alexey Proskuryakov <ap@webkit.org>
3158 Reviewed by Sam Weinig.
3160 https://bugs.webkit.org/show_bug.cgi?id=24575
3161 XHR response is incorrect after a network error.
3163 Tests: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
3164 http/tests/xmlhttprequest/cross-site-denied-response-sync.html
3165 http/tests/xmlhttprequest/cross-site-denied-response.html
3167 * xml/XMLHttpRequest.cpp:
3168 (WebCore::XMLHttpRequest::networkError): Call internalAbort() to fully reset the request.
3169 (WebCore::XMLHttpRequest::didFailRedirectCheck): No need to call internalAbort() here. Note
3170 that since internalAbort() can drop GC protection, it is not safe to use the object after
3172 (WebCore::XMLHttpRequest::didReceiveData): Check that the request wasn't aborted, and
3173 return early if it was. This can happen during sync requests, as the loader does not know
3174 that it was aborted, and just synthesizes all callbacks.
3176 2009-03-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
3178 Reviewed by Alexey Proskuryakov.
3180 https://bugs.webkit.org/show_bug.cgi?id=3547
3181 XMLHttpRequest.statusText returns always "OK"
3183 Covered by existing tests (which now pass on all platforms but Mac).
3185 * xml/XMLHttpRequest.cpp:
3186 (WebCore::XMLHttpRequest::statusText): Return ResourceResponse status text. It is now up
3187 to each platform to correctly set the status text or set it to "OK" to retain current
3190 2009-03-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
3192 Reviewed by Alexey Proskuryakov.
3194 https://bugs.webkit.org/show_bug.cgi?id=24349
3195 [QT] HTTP status text is never set
3197 Set HTTP status text to the reason phrase attribute of QNetworkReply.
3199 * platform/network/qt/QNetworkReplyHandler.cpp:
3200 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3202 2009-03-12 Simon Fraser <simon.fraser@apple.com>
3204 Reviewed by Mark Rowe
3206 <rdar://problem/6622300>: Reproducible crash on
3207 <http://www.editgrid.com/explore/tnc/dave/FusionChart%3A_Candlestick>
3209 Prevent CSSStyleSheet::checkLoaded() writing to freed memory when it gets
3210 deleted from under itself. The sheetLoaded() notification can allow scripts
3211 to run via HTMLTokenizer::executeScriptsWaitingForStylesheets(),
3212 which can cause the last ref to the CSSStyleSheet to be released.
3214 * css/CSSStyleSheet.cpp:
3215 (WebCore::CSSStyleSheet::checkLoaded):
3217 2009-03-12 Kevin Ollivier <kevino@theolliviers.com>
3219 wx build fix. Allow make-generated-sources.sh to pass args down to DerivedSources.make
3221 * make-generated-sources.sh:
3223 2009-03-12 Adam Treat <adam.treat@torchmobile.com>
3225 Reviewed by Oliver Hunt.
3227 https://bugs.webkit.org/show_bug.cgi?id=24498
3228 Fix the Qt port to use the same algorithm for drawing dashed and dotted
3229 borders as the other ports. This makes the Qt port pixel-for-pixel perfect
3230 compared to border drawing with Apple's canonical mac port and much closer
3231 to konqueror and firefox behavior.
3233 * platform/graphics/qt/GraphicsContextQt.cpp:
3234 (WebCore::GraphicsContext::drawLine):
3236 2009-02-26 Eric Seidel <eric@webkit.org>
3238 Reviewed by Justin Garcia.
3240 Clean up DOMSelection to use some helper functions
3241 making the code smaller, and less error-prone.
3242 https://bugs.webkit.org/show_bug.cgi?id=19221
3244 I tried moving DOMSelection off of rangeCompliantEquivalent
3245 but failed. VisibleSelection holds positions like (table, 1) to mean
3248 * page/DOMSelection.cpp:
3249 (WebCore::DOMSelection::visibleSelection):
3250 (WebCore::anchorPosition):
3251 (WebCore::focusPosition):
3252 (WebCore::basePosition):
3253 (WebCore::extentPosition):
3254 (WebCore::DOMSelection::anchorNode):
3255 (WebCore::DOMSelection::anchorOffset):
3256 (WebCore::DOMSelection::focusNode):
3257 (WebCore::DOMSelection::focusOffset):
3258 (WebCore::DOMSelection::baseNode):
3259 (WebCore::DOMSelection::baseOffset):
3260 (WebCore::DOMSelection::extentNode):
3261 (WebCore::DOMSelection::extentOffset):
3262 * page/DOMSelection.h:
3264 2009-03-12 Dmitry Titov <dimich@chromium.org>
3266 Reviewed by Dimitri Glazkov.
3268 https://bugs.webkit.org/show_bug.cgi?id=24563
3269 Change ResourceRequest to be a struct rather then a class to match other declarations.
3271 * platform/network/chromium/ResourceRequest.h:
3273 2009-03-12 David Levin <levin@chromium.org>
3275 Reviewed by Darin Fisher.
3277 Bug 24530: width100percent-searchfield.html should be fixed for chromium.
3278 <https://bugs.webkit.org/show_bug.cgi?id=24530>
3280 Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
3282 * css/themeChromiumWin.css: Added.
3283 Overrides the changes to start supporting input[type="search"] on Windows (since
3284 Chromium doesn't do anything special for this).
3286 * rendering/RenderThemeChromiumWin.cpp:
3287 (WebCore::supportsFocus):
3288 (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
3289 (WebCore::RenderThemeChromiumWin::determineState):
3290 (WebCore::RenderThemeChromiumWin::getThemeData):
3292 2009-03-12 Greg Bolsinga <bolsinga@apple.com>
3294 Reviewed by Antti Koivisto.
3296 https://bugs.webkit.org/show_bug.cgi?id=24506
3297 Geolocation in Safari differs from the spec, no Coordinates attribute on Position
3301 * DerivedSources.make:
3305 * WebCore.vcproj/WebCore.vcproj:
3306 * WebCore.xcodeproj/project.pbxproj:
3307 * WebCoreSources.bkl:
3308 * bindings/js/JSGeolocationCustom.cpp:
3309 (WebCore::createPositionOptions):
3310 * page/Coordinates.cpp: Added.
3311 (WebCore::Coordinates::toString):
3312 * page/Coordinates.h: Added.
3313 (WebCore::Coordinates::create):
3314 (WebCore::Coordinates::latitude):
3315 (WebCore::Coordinates::longitude):
3316 (WebCore::Coordinates::altitude):
3317 (WebCore::Coordinates::accuracy):
3318 (WebCore::Coordinates::altitudeAccuracy):
3319 (WebCore::Coordinates::heading):
3320 (WebCore::Coordinates::speed):
3321 (WebCore::Coordinates::Coordinates):
3322 * page/Coordinates.idl: Added.
3323 * page/Geoposition.cpp:
3324 (WebCore::Geoposition::toString):
3325 * page/Geoposition.h:
3326 (WebCore::Geoposition::create):
3327 (WebCore::Geoposition::coords):
3328 (WebCore::Geoposition::Geoposition):
3329 * page/Geoposition.idl:
3330 * page/PositionOptions.h:
3331 (WebCore::PositionOptions::create):
3332 (WebCore::PositionOptions::maximumAge):
3333 (WebCore::PositionOptions::setMaximumAge):
3334 (WebCore::PositionOptions::PositionOptions):
3335 * platform/mac/GeolocationServiceMac.mm:
3336 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3338 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
3340 Reviewed by Darin Fisher.
3342 https://bugs.webkit.org/show_bug.cgi?id=24496
3343 Fix console logging of non-string values by coercing the argument to
3344 a string, for V8 bindings.
3346 Test: fast/js/console-non-string-values.html
3348 * bindings/v8/ScriptValue.cpp: Added toString method.
3349 (WebCore::ScriptValue::toString):
3350 * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
3351 and toString declaration.
3353 2009-03-12 Darin Fisher <darin@chromium.org>
3355 Reviewed by Dimitri Glazkov.
3357 Eliminate ChromiumBridge::uiResourceProtocol
3358 https://bugs.webkit.org/show_bug.cgi?id=24558
3360 * platform/chromium/ChromiumBridge.h:
3362 2009-03-12 Greg Bolsinga <bolsinga@apple.com>
3364 Reviewed by Simon Fraser.
3366 Missing breaks in switch statement
3367 https://bugs.webkit.org/show_bug.cgi?id=24556
3369 * platform/mac/GeolocationServiceMac.mm:
3370 (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
3372 2009-03-12 Darin Fisher <darin@chromium.org>
3374 Reviewed by Dimitri Glazkov.
3376 https://bugs.webkit.org/show_bug.cgi?id=24554
3377 Remove some unused functions from ChromiumBridge.
3379 * platform/chromium/ChromiumBridge.h:
3381 2009-03-02 Eric Seidel <eric@webkit.org>
3383 Reviewed by Darin Fisher and Justin Garcia.
3385 Safari crashes during drag and drop in Google presentations
3386 due to mutation event handlers removing DOM content during insertNode
3387 https://bugs.webkit.org/show_bug.cgi?id=22634
3389 Added a bunch of "null" checks to make sure nodes are still
3390 in the document before we operate on them. This is an
3391 inelegant solution, but it's the best we have for now.
3393 Test: editing/selection/crash-on-drag-with-mutation-events.html
3395 * editing/CompositeEditCommand.cpp:
3396 (WebCore::CompositeEditCommand::insertNodeAt):
3397 * editing/ReplaceSelectionCommand.cpp:
3398 (WebCore::ReplaceSelectionCommand::doApply):
3400 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
3402 Reviewed by Adam Treat.
3404 https://bugs.webkit.org/show_bug.cgi?id=24525
3405 REGRESSION: Inspector window doesn't close when inspected page is
3406 destroyed. This is a revert of r41158, which became unnecessary when
3407 InspectorController became ref-counted in r41462.
3409 * inspector/InspectorController.cpp:
3410 (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
3411 after calling close().
3412 (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
3413 m_inspectedPage check guard around profile logic.
3415 2009-03-12 Peter Kasting <pkasting@google.com>
3417 Reviewed by Darin Fisher.
3419 https://bugs.webkit.org/show_bug.cgi?id=24502
3420 Make horizontal scrolling on Windows always go the correct direction.
3422 * platform/PlatformWheelEvent.h:
3423 * platform/win/WheelEventWin.cpp:
3424 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3426 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
3428 Reviewed by Simon Fraser.
3430 https://bugs.webkit.org/show_bug.cgi?id=24496
3431 Fix console logging of non-string values by coercing the argument to
3434 Test: fast/js/console-non-string-values.html
3436 * bindings/js/ScriptValue.cpp: Removed PlatformString include.
3437 * bindings/js/ScriptValue.h: Added toString method.
3438 (WebCore::ScriptValue::toString):
3440 (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
3441 ScriptValue::toString.
3442 (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
3443 (WebCore::Console::count): Ditto.
3445 2009-03-12 Simon Fraser <simon.fraser@apple.com>
3447 Reviewed by Adele Peterson.
3449 https://bugs.webkit.org/show_bug.cgi?id=24508
3451 Fix updating of text field with placeholder text when value is set
3452 by ensuring that updatePlaceholderVisibility() is called after
3453 the value has been updated, not before.
3455 Test: fast/forms/placeholder-set-value.html
3457 * html/HTMLInputElement.cpp:
3458 (WebCore::HTMLInputElement::setValue):
3460 2009-03-12 Simon Fraser <simon.fraser@apple.com>
3462 Reviewed by Dave Hyatt
3464 https://bugs.webkit.org/show_bug.cgi?id=24552
3466 Hit testing involving normal flow, self-painting layers (e.g. reflections)
3467 was broken because it was not null-testing the result of hitTestLayer(),
3468 so bailing early with a nil hit layer.
3470 Test: fast/layers/normal-flow-hit-test.html
3472 * rendering/RenderLayer.cpp:
3473 (WebCore::RenderLayer::hitTestLayer):
3475 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
3477 Reviewed by Cameron Zwarich.
3479 Removed zero-sized files, left over from improperly applied patch.
3481 * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
3482 * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
3484 2009-03-12 Adam Treat <adam.treat@torchmobile.com>
3486 Reviewed by George Staikos.
3488 Do not ignore alpha color in optimization. Hard to believe, but there
3489 are websites that fill the entire page with a tiled image consisting of
3490 nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
3492 * platform/graphics/qt/ImageQt.cpp:
3493 (WebCore::BitmapImage::checkForSolidColor):
3495 2009-03-12 Julien Chaffraix <jchaffraix@webkit.org>
3497 Reviewed by Darin Adler.
3499 Bug 24110: cloneNode should call cloneElement and not the reverse
3501 - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
3502 Now cloneNode calls one of the 2 previous methods.
3504 - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
3506 - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
3508 - Removed Element::cloneNode usage through WebCore.
3511 (WebCore::Element::cloneNode): Moved to Element's private section and it
3512 now calls the two next methods.
3513 (WebCore::Element::cloneElementWithChildren): Added.
3514 (WebCore::Element::cloneElementWithoutChildren): Renamed from cloneElement
3518 * editing/ApplyStyleCommand.cpp:
3519 (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Changed call to cloneElement
3520 to call to cloneElementWithoutChildren.
3521 * editing/BreakBlockquoteCommand.cpp:
3522 (WebCore::BreakBlockquoteCommand::doApply): Ditto.
3523 * editing/IndentOutdentCommand.cpp:
3524 (WebCore::IndentOutdentCommand::indentRegion): Ditto.
3525 * editing/InsertParagraphSeparatorCommand.cpp:
3526 (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
3527 * editing/ModifySelectionListLevel.cpp:
3528 (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
3529 * editing/SplitElementCommand.cpp:
3530 (WebCore::SplitElementCommand::doApply): Ditto.
3531 * editing/markup.cpp:
3532 (WebCore::createFragmentFromText): Ditto.
3533 * svg/SVGUseElement.cpp:
3534 (WebCore::SVGUseElement::buildShadowTree): Ditto.
3535 (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
3537 2009-03-12 Dirk Schulze <krit@webkit.org>
3539 Reviewed by Oliver Hunt.
3541 Fixed a crash on the 1x1 pixel check for background image in gtk.
3542 We need to load the image first and need to be sure that the image
3543 is not null before checking the type.
3545 * platform/graphics/cairo/ImageCairo.cpp:
3546 (WebCore::BitmapImage::checkForSolidColor):
3548 2009-03-12 Xan Lopez <xlopez@igalia.com>
3550 Reviewed by Alexey Proskuryakov.