1 2011-04-07 Dan Bernstein <mitz@apple.com>
3 Reviewed by Simon Fraser.
5 <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
6 https://bugs.webkit.org/show_bug.cgi?id=58083
8 Test: fast/text/decorations-transformed.html
10 * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
11 is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
12 gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
13 the width and the height. In this new mode, translating a rectangle in user space never changes
14 its dimensions in device pixels.
15 * platform/graphics/cg/GraphicsContextCG.cpp:
16 (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
17 (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
18 all underlines have the same thickness in device pixels.
19 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
20 (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
21 * platform/graphics/qt/GraphicsContextQt.cpp:
22 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
23 * platform/graphics/skia/GraphicsContextSkia.cpp:
24 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
25 * platform/graphics/wince/GraphicsContextWinCE.cpp:
26 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
27 * platform/graphics/wx/GraphicsContextWx.cpp:
28 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
29 * rendering/InlineTextBox.cpp:
30 (WebCore::InlineTextBox::paintDecoration):
32 2011-04-06 Vitaly Repeshko <vitalyr@chromium.org>
34 Reviewed by Nate Chapin.
36 [V8] Remove custom DOMImplementation getter on Document.
37 https://bugs.webkit.org/show_bug.cgi?id=57991
39 The custom getter is no longer required because DOMImplementation
40 objects are now created per document.
42 Test: fast/dom/DOMImplementation/implementation-identity.html
44 * bindings/scripts/CodeGeneratorV8.pm:
45 * bindings/v8/custom/V8DocumentCustom.cpp:
48 2011-04-07 Sergey Glazunov <serg.glazunov@gmail.com>
50 Reviewed by Dimitri Glazkov.
52 setHasID() is only called for styled elements
53 https://bugs.webkit.org/show_bug.cgi?id=57267
55 Test: fast/dom/non-styled-element-id-crash.html
58 (WebCore::Element::attributeChanged):
59 (WebCore::Element::idAttributeChanged):
61 * dom/StyledElement.cpp:
62 (WebCore::StyledElement::parseMappedAttribute):
64 2011-04-07 Jer Noble <jer.noble@apple.com>
66 Reviewed by Eric Carlson.
68 HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
69 https://bugs.webkit.org/show_bug.cgi?id=58070
71 Make the HTMLMediaElement full screen functions call into the new Full Screen API when
72 FULLSCREEN_API is enabled.
74 * html/HTMLMediaElement.cpp:
75 (WebCore::HTMLMediaElement::enterFullscreen):
76 (WebCore::HTMLMediaElement::exitFullscreen):
78 2011-04-07 Adam Barth <abarth@webkit.org>
80 Reviewed by Eric Seidel.
82 Implement CSP's options directive
83 https://bugs.webkit.org/show_bug.cgi?id=58014
85 This patch contains the full options parser, but we only have enough of
86 CSP implemented to see the effects of disable-xss-protection. Will
87 need to do some more work before we can see eval-script in action.
89 Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
90 http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
92 * page/ContentSecurityPolicy.cpp:
93 (WebCore::CSPOptions::CSPOptions):
94 (WebCore::CSPOptions::disableXSSProtection):
95 (WebCore::CSPOptions::evalScript):
96 (WebCore::CSPOptions::parse):
97 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
98 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
99 (WebCore::ContentSecurityPolicy::allowInlineScript):
100 (WebCore::ContentSecurityPolicy::addDirective):
101 * page/ContentSecurityPolicy.h:
103 2011-04-07 Alexey Proskuryakov <ap@apple.com>
105 Reviewed by Anders Carlsson.
107 REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
108 https://bugs.webkit.org/show_bug.cgi?id=58066
109 <rdar://problem/8965302>
111 * platform/mac/HTMLConverter.h:
112 * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
113 Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
114 it's now used in WebKit2.
116 2011-04-07 Andy Estes <aestes@apple.com>
118 Reviewed by Darin Adler.
120 REGRESSION (r64712): Microsoft Outlook 2011: original message contents
121 not included when replying to an email.
122 https://bugs.webkit.org/show_bug.cgi?id=57794
125 * loader/FrameLoader.cpp:
126 (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
127 before checking if the FrameLoader is parsing the initial empty document.
128 This allows user scripts to be injected at the end of document parsing
129 (if the setting is enabled).
131 (WebCore::Frame::injectUserScripts): Do not inject scripts if this
132 feature is disabled on the initial empty document.
134 (WebCore::Settings::Settings):
135 * page/Settings.h: Add a setting for injecting user scripts into the
136 initial empty document (defaults to false).
137 (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
138 (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
139 * platform/mac/RuntimeApplicationChecks.h:
140 * platform/mac/RuntimeApplicationChecks.mm:
141 (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
142 application is Microsoft Outlook.
144 2011-04-06 Jer Noble <jer.noble@apple.com>
146 Reviewed by Maciej Stachowiak.
148 AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
149 https://bugs.webkit.org/show_bug.cgi?id=57962
151 Add support for a new AVPlayerItem API which will notify clients when their
152 seek completes. This requires a new Notification type to be passed to the main
153 thread in MediaPlayerPrivateAVFoundation.
155 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
156 (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
157 (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
158 overloaded functions which take a Notification; and a Notification::Type and boolean.
159 (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted
161 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
162 (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
163 (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
164 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
165 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
166 (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
168 2011-04-07 Nancy Piedra <nancy.piedra@nokia.com>
170 Reviewed by Eric Carlson.
172 Parse quotes from content type parameters
173 https://bugs.webkit.org/show_bug.cgi?id=53275
175 This functionality is tested in video-can-play-type.html layout test
176 where I've added codecs parameter with good and bad formatting.
178 * platform/ContentType.cpp:
179 (WebCore::ContentType::parameter):
181 2011-04-07 Pavel Feldman <pfeldman@google.com>
183 Reviewed by Yury Semikhatsky.
185 Web Inspector: remove "enabled" from the setBreakpoint protocol.
186 https://bugs.webkit.org/show_bug.cgi?id=58047
188 * bindings/js/ScriptDebugServer.cpp:
189 (WebCore::ScriptDebugServer::hasBreakpoint):
190 * bindings/v8/DebuggerScript.js:
192 * bindings/v8/ScriptDebugServer.cpp:
193 (WebCore::ScriptDebugServer::setBreakpoint):
194 * inspector/Inspector.json:
195 * inspector/InspectorDebuggerAgent.cpp:
196 (WebCore::buildObjectForBreakpointCookie):
197 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
198 (WebCore::InspectorDebuggerAgent::setBreakpoint):
199 (WebCore::InspectorDebuggerAgent::continueToLocation):
200 (WebCore::InspectorDebuggerAgent::didParseSource):
201 * inspector/InspectorDebuggerAgent.h:
202 * inspector/ScriptBreakpoint.h:
203 (WebCore::ScriptBreakpoint::ScriptBreakpoint):
204 * inspector/front-end/DebuggerModel.js:
205 (WebInspector.DebuggerModel.prototype.setBreakpoint):
206 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
207 * inspector/front-end/DebuggerPresentationModel.js:
208 (WebInspector.DebuggerPresentationModel):
209 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
210 (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
211 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
212 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
213 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
214 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
215 (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
216 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
217 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
218 (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
219 (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
220 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
221 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
222 (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
223 (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
224 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
225 (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
226 (WebInspector.DebuggerPresentationModel.prototype._reset):
227 (WebInspector.PresentationBreakpoint):
229 2011-04-07 Dan Bernstein <mitz@apple.com>
231 Reviewed by Adam Roben.
233 Removed a redundant line of code.
235 * rendering/RenderInline.cpp:
236 (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
237 this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
239 2011-04-07 Liang Qi <liang.qi@nokia.com>
241 Reviewed by Laszlo Gombos.
243 [Qt][Symbian] Enable webkit build with GCCE on Symbian.
244 https://bugs.webkit.org/show_bug.cgi?id=57841
246 * WebCore.pri: Thanks for Norbert Leser <norbert.leser@nokia.com> who checked RVCT part.
247 --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
248 to 0x1000000 together. They need to be updated in the future when WebKit grows.
250 2011-04-06 Pavel Feldman <pfeldman@google.com>
252 Reviewed by Yury Semikhatsky.
254 Web Inspector: get rid of Breakpoint.js.
255 https://bugs.webkit.org/show_bug.cgi?id=57949
258 * WebCore.vcproj/WebCore.vcproj:
259 * inspector/front-end/Breakpoint.js: Removed.
260 * inspector/front-end/BreakpointsSidebarPane.js:
261 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
262 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
263 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
264 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
265 * inspector/front-end/DebuggerModel.js:
266 (WebInspector.DebuggerModel):
267 (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
268 (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
269 (WebInspector.DebuggerModel.prototype.setBreakpoint):
270 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
271 (WebInspector.DebuggerModel.prototype.removeBreakpoint):
272 (WebInspector.DebuggerModel.prototype._breakpointResolved):
273 (WebInspector.DebuggerModel.prototype.reset):
274 * inspector/front-end/DebuggerPresentationModel.js:
275 (WebInspector.DebuggerPresentationModel):
276 (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
277 (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
278 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
279 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
280 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
281 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
282 (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
283 (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
284 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
285 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
286 (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
287 (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
288 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
289 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
290 (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
291 (WebInspector.DebuggerPresentationModel.prototype._reset):
292 (WebInspector.PresentationBreakpoint):
293 (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
294 (WebInspector.PresentationBreakpoint.prototype.get url):
295 (WebInspector.PresentationBreakpoint.prototype.get resolved):
296 (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
297 * inspector/front-end/ResourceTreeModel.js:
298 (WebInspector.ResourceTreeModel):
299 (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
300 (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
301 * inspector/front-end/ScriptsPanel.js:
302 (WebInspector.ScriptsPanel):
303 (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
304 (WebInspector.ScriptsPanel.prototype.reset):
305 * inspector/front-end/WebKit.qrc:
306 * inspector/front-end/inspector.html:
308 2011-04-07 Yury Semikhatsky <yurys@chromium.org>
310 Reviewed by Pavel Feldman.
312 Web Inspector: console messages names should adhere to the common naming style
313 https://bugs.webkit.org/show_bug.cgi?id=58042
315 * inspector/ConsoleMessage.cpp:
316 (WebCore::ConsoleMessage::addToFrontend):
317 (WebCore::ConsoleMessage::updateRepeatCountInConsole):
318 * inspector/Inspector.json:
319 * inspector/InspectorConsoleAgent.cpp:
320 (WebCore::InspectorConsoleAgent::clearConsoleMessages):
321 * inspector/front-end/ConsoleView.js:
322 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
323 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
324 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
325 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
327 2011-04-06 Ilya Tikhonovsky <loislo@chromium.org>
329 Reviewed by Yury Semikhatsky.
331 Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
332 https://bugs.webkit.org/show_bug.cgi?id=57957
334 There is not a significant difference between inspector messages spec and and JSON-RPC 2.0 messages spec.
335 Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
336 It was decided that we will use it.
340 2) domain + '.' + event => method // for events
341 3) domain + '.' + command => method // for requests
342 4) requestId => id // for responses
343 5) arguments => params // for requests
344 6) data => params // for events
345 7) body => result // for responses
347 protocolErrors and error properties will be converted to JSON-RPC error format.
348 The order of properties in messages also will be adjusted.
349 The only thing that looks unnecessary is jsonrpc property.
351 * inspector/CodeGeneratorInspector.pm:
353 2011-04-07 Ryosuke Niwa <rniwa@webkit.org>
355 Reviewed by Eric Seidel.
357 Add functions to update left and right offsets to LineOffsets
358 https://bugs.webkit.org/show_bug.cgi?id=58028
360 Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
361 which are used to update m_left and m_right. Also added m_block and m_isFirstLine
362 member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
364 * rendering/RenderBlock.h:
365 * rendering/RenderBlockLineLayout.cpp:
366 (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
367 (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
368 (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
369 (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
370 (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
371 (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
372 no longer passes firstLine around.
374 2011-04-06 Pavel Feldman <pfeldman@google.com>
376 Reviewed by Yury Semikhatsky.
378 Web Inspector: migrate debugger domain to the unified breakpoint location notion.
379 https://bugs.webkit.org/show_bug.cgi?id=57928
381 * inspector/Inspector.json:
382 * inspector/InspectorDebuggerAgent.cpp:
383 (WebCore::buildObjectForBreakpointCookie):
384 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
385 (WebCore::InspectorDebuggerAgent::setBreakpoint):
386 (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
387 (WebCore::InspectorDebuggerAgent::didParseSource):
388 * inspector/InspectorDebuggerAgent.h:
389 * inspector/front-end/Breakpoint.js:
390 (WebInspector.Breakpoint):
391 * inspector/front-end/DebuggerModel.js:
392 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
393 (WebInspector.DebuggerModel.prototype._breakpointResolved):
395 2011-04-07 Andreas Kling <andreas.kling@nokia.com>
397 Reviewed by Benjamin Poulain.
399 [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
401 When initializing a QStyleOptionSlider from a widget, the State_Horizontal
402 hint may get set depending on how that widget is laid out in its parent.
403 If this happens when drawing a vertical scrollbar, the hint is never
404 cleared and we end up painting a vertical scrollbar with horizontal arrows.
406 Covered by pixel tests which should no longer paint silly scrollbars.
408 * platform/qt/ScrollbarThemeQt.cpp:
409 (WebCore::styleOptionSlider):
411 2011-04-07 Adam Barth <abarth@webkit.org>
413 Reviewed by Eric Seidel.
415 script-src should block inline script
416 https://bugs.webkit.org/show_bug.cgi?id=58012
418 Block inline scripts at the ScriptElement layer. This should catch
419 exactly the scripts we want to catch.
421 Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
424 (WebCore::Document::processHttpEquiv):
425 - This patch also adds the ability to supply a CSP policy via a
426 <meta> tag. We'll update the name of the header once we've
427 finished implementing the spec.
428 * dom/ScriptElement.cpp:
429 (WebCore::ScriptElement::executeScript):
430 * page/ContentSecurityPolicy.cpp:
431 (WebCore::ContentSecurityPolicy::allowInlineScript):
432 * page/ContentSecurityPolicy.h:
434 2011-04-07 Alice Boxhall <aboxhall@chromium.org>
436 Reviewed by Ryosuke Niwa.
438 Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
439 https://bugs.webkit.org/show_bug.cgi?id=57921
441 Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
442 that the same logic can be used for a HitTestResult.
444 No visible changes, just cleanup, so no tests.
446 * page/EventHandler.cpp:
447 (WebCore::EventHandler::selectClosestWordFromMouseEvent):
448 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
449 (WebCore::EventHandler::handleMousePressEventTripleClick):
450 (WebCore::EventHandler::handleMousePressEventSingleClick):
451 (WebCore::EventHandler::handleMousePressEvent):
452 (WebCore::EventHandler::handleMouseDraggedEvent):
453 (WebCore::EventHandler::handleMouseReleaseEvent):
454 (WebCore::EventHandler::subframeForHitTestResult):
455 Made public static member, so that it can access targetNode(), and be accessed by
456 webkitwebview in gtk.
457 (WebCore::EventHandler::selectCursor):
458 (WebCore::EventHandler::targetNode):
459 (WebCore::EventHandler::handleMouseDoubleClickEvent):
460 (WebCore::EventHandler::handleMouseMoveEvent):
461 (WebCore::EventHandler::updateDragAndDrop):
462 (WebCore::EventHandler::sendContextMenuEvent):
463 * page/EventHandler.h:
464 * page/MouseEventWithHitTestResults.cpp:
465 (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
466 * page/MouseEventWithHitTestResults.h:
467 * page/android/EventHandlerAndroid.cpp:
468 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
469 * page/brew/EventHandlerBrew.cpp:
470 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
471 * page/chromium/EventHandlerChromium.cpp:
472 (WebCore::EventHandler::passMousePressEventToSubframe):
473 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
474 * page/efl/EventHandlerEfl.cpp:
475 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
476 * page/gtk/EventHandlerGtk.cpp:
477 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
478 * page/haiku/EventHandlerHaiku.cpp:
479 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
480 * page/mac/EventHandlerMac.mm:
481 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
482 (WebCore::EventHandler::passSubframeEventToSubframe):
483 * page/wx/EventHandlerWx.cpp:
484 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
486 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
488 Reviewed by Pavel Feldman.
490 Web Inspector: build mapping for formatted scripts based on keywords positions.
491 https://bugs.webkit.org/show_bug.cgi?id=57936
493 Mapping based on [\$\.\w]+ was not accurate because string literals representation
494 may be different in original and formatted scripts.
496 * inspector/front-end/ScriptFormatterWorker.js:
497 (buildMapping.regexp.b):
500 2011-04-07 Kent Tamura <tkent@chromium.org>
502 Reviewed by Dimitri Glazkov.
504 Spinbuttons become unclickable if right padding is large.
505 https://bugs.webkit.org/show_bug.cgi?id=56298
507 An inner-spin-button is put on the right border and ignores right
508 padding in RenderTextControlSingleLine::layout(), but forwardEvent()
509 checks if a point is in an area just right of an internal text block.
510 This inconsistency caused a bug that an inner-spin-button with large
511 padding didn't receive mouse events.
513 To fix this bug, we render spin buttons as layers, and remove manual
514 event forwarding code.
516 Test: fast/forms/input-number-large-padding.html
518 * css/html.css: Add "position:relative" to make a spin-button a layer.
519 (input::-webkit-inner-spin-button):
520 (input::-webkit-outer-spin-button):
521 * rendering/RenderTextControlSingleLine.cpp:
522 (WebCore::RenderTextControlSingleLine::forwardEvent):
523 Remove manual event forwarding code.
525 2011-04-06 Adam Barth <abarth@webkit.org>
527 Reviewed by Eric Seidel.
529 CSP object-src should block plugin loads
530 https://bugs.webkit.org/show_bug.cgi?id=57283
532 This change is pretty straight-forward. It's slighly unclear to me
533 whether this patch is correct w.r.t. the code in DocumentWriter. I've
534 added a FIXME comment, and I'll investigate that case more in the future.
536 Test: http/tests/security/contentSecurityPolicy/object-src-none.html
538 * loader/DocumentWriter.cpp:
539 (WebCore::DocumentWriter::begin):
540 * loader/SubframeLoader.cpp:
541 (WebCore::SubframeLoader::requestPlugin):
542 * page/ContentSecurityPolicy.cpp:
543 (WebCore::ContentSecurityPolicy::allowObjectFromSource):
544 (WebCore::ContentSecurityPolicy::addDirective):
545 * page/ContentSecurityPolicy.h:
547 2011-04-06 Beth Dakin <bdakin@apple.com>
549 Reviewed by Dan Bernstein.
551 https://bugs.webkit.org/show_bug.cgi?id=58009
552 Frame::scalePage() results in visual artifacts with scale factors less than 1
554 <rdar://problem/8683230>
556 Fall into the case where we fill with a background base color when there is a page
557 scale factor that is less than 1.
558 * rendering/RenderView.cpp:
559 (WebCore::RenderView::paintBoxDecorations):
561 2011-04-06 Jer Noble <jer.noble@apple.com>
563 Reviewed by Darin Adler.
565 AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
566 https://bugs.webkit.org/show_bug.cgi?id=57982
568 Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
570 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
571 (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
573 2011-04-06 Jer Noble <jer.noble@apple.com>
575 Reviewed by Eric Carlson.
577 MediaPlayerPrivateAVFoundation does not change rate due to setRate().
578 https://bugs.webkit.org/show_bug.cgi?id=57919
580 Test: media/video-set-rate-from-pause.html
582 The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
583 of the media; instead a subclass must do that work. So when setRate() is called,
584 inform a subclass through a new pure virtual updateRate() function that there's
587 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
588 (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
589 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
590 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
591 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
592 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added. Set the requested rate.
594 2011-04-06 Dai Mikurube <dmikurube@chromium.org>
596 Reviewed by David Levin.
598 Add QUOTA build flag for unified quota API
599 https://bugs.webkit.org/show_bug.cgi?id=57918
601 * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
602 * GNUmakefile.am: Added QUOTA build flag
603 * WebCore.pri: Added QUOTA build flag
605 2011-04-06 Stephanie Lewis <slewis@apple.com>
607 Reviewed by Darin Adler.
609 https://bugs.webkit.org/show_bug.cgi?id=57997
610 <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
611 Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
612 Cancel all enqueued events when detaching the Document the events cannot keep the Document
615 No change in functionality so no new tests.
618 (WebCore::Document::detach):
619 * dom/EventQueue.cpp:
620 (WebCore::EventQueue::cancelQueuedEvents):
623 2011-04-06 Dan Bernstein <mitz@apple.com>
625 Reviewed by Darin Adler.
627 <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
628 https://bugs.webkit.org/show_bug.cgi?id=58002
630 * platform/graphics/mac/SimpleFontDataMac.mm:
631 (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
632 does not require the vertical metrics tweaks that were needed in Leopard. That the
633 tweaks were being applied went mostly unnoticed until r73993, because until then it
634 only affected cases where Geeza Pro was specified, not when it occurred as a fallback
637 2011-04-06 Roland Steiner <rolandsteiner@chromium.org>
639 Reviewed by Dimitri Glazkov.
641 Bug 57994 - Move guardRef functionality back to Document
642 https://bugs.webkit.org/show_bug.cgi?id=57994
644 Move the relevant code parts from TreeScope back into Document.
646 No new tests. (no new functionality)
649 (WebCore::Document::removedLastRef):
652 (WebCore::TreeScope::destroyTreeScopeData):
655 2011-04-06 Ian Henderson <ianh@apple.com>
657 Reviewed by Simon Fraser, Antti Koivisto.
659 Fast path for parsing simple CSS values
660 https://bugs.webkit.org/show_bug.cgi?id=57964
662 Add functions to parse simple color or dimension values, skipping the
663 overhead of full CSS parsing.
665 Change parseValue to a static method to avoid unnecessary allocation
666 of a CSSParser in the fast case.
668 * css/CSSMutableStyleDeclaration.cpp:
669 (WebCore::CSSMutableStyleDeclaration::setProperty):
670 Changed to use the new, static parseValue method.
672 (WebCore::isColorPropertyID):
673 (WebCore::parseColorValue):
674 Parses any color accepted by the existing parseColor() static method.
675 We must handle color identifiers separately, since parseColor() will
676 change 'red' into 'rgb(255, 0, 0)'.
677 (WebCore::isSimpleLengthPropertyID):
678 (WebCore::parseSimpleLengthValue):
679 Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
680 false, or 'NN' is '0'). Returns false to fall back to the slow path.
681 (WebCore::CSSParser::parseValue):
683 * css/WebKitCSSMatrix.cpp:
684 (WebCore::WebKitCSSMatrix::setMatrixValue):
685 Changed to use the new, static parseValue method.
687 2011-04-06 Kevin Ollivier <kevino@theolliviers.com>
689 Reviewed by Darin Adler.
691 Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
693 https://bugs.webkit.org/show_bug.cgi?id=27551
697 2011-04-06 Simon Fraser <simon.fraser@apple.com>
699 Reviewed by Antti Koivisto.
701 Some minor style resolution optimizations
702 https://bugs.webkit.org/show_bug.cgi?id=57996
704 A couple of minor optimizations to style-related code.
706 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
707 (WebCore::isCSSPropertyName):
708 (WebCore::JSCSSStyleDeclaration::putDelegate):
709 Avoid calling cssPropertyName() twice when setting style on an element.
711 * css/CSSStyleSelector.cpp:
712 (WebCore::useSVGZoomRules):
713 (WebCore::CSSStyleSelector::applyProperty):
714 Avoid calling isSVGElement() for every property, since only a two properties
717 2011-04-06 Ian Henderson <ianh@apple.com>
719 Reviewed by Antti Koivisto.
721 Unnecessary string allocation in CSSStyleDeclaration::setProperty
722 https://bugs.webkit.org/show_bug.cgi?id=57995
724 Pass the bool representing the property's importance directly instead
725 of constructing a string.
727 * css/CSSStyleDeclaration.cpp:
728 (WebCore::CSSStyleDeclaration::setProperty):
730 2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org>
732 Reviewed by Steve Block.
734 Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
735 https://bugs.webkit.org/show_bug.cgi?id=57963
737 No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
739 * bindings/v8/V8Utilities.h:
740 (WebCore::createFunctionOnlyCallback):
741 * bindings/v8/custom/V8GeolocationCustom.cpp:
742 (WebCore::V8Geolocation::getCurrentPositionCallback):
743 (WebCore::V8Geolocation::watchPositionCallback):
745 2011-04-06 Brian Weinstein <bweinstein@apple.com>
747 Reviewed by Adam Roben.
749 WebKit2: Support Windows 7 Gestures
750 https://bugs.webkit.org/show_bug.cgi?id=49824
751 <rdar://problem/8689728>
753 Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
755 * WebCore.vcproj/WebCore.vcproj:
756 * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
758 2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
760 Reviewed by Andreas Kling.
762 [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
763 https://bugs.webkit.org/show_bug.cgi?id=57974
765 We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
767 No new tests needed, just a config flag rename.
771 2011-04-06 Tyler Close <tjclose@chromium.org>
773 Reviewed by Nate Chapin.
775 run-bindings-tests reference files out of sync with CodeGenerator*.pm
776 https://bugs.webkit.org/show_bug.cgi?id=57967
778 * bindings/scripts/test/V8/V8TestCallback.cpp:
780 2011-04-06 Asanka Herath <asanka@chromium.org>
782 Reviewed by Darin Fisher.
784 Add new TargetType: TargetIsFavicon
786 https://bugs.webkit.org/show_bug.cgi?id=57659
788 No new functionality added, so no additional tests.
790 * platform/network/ResourceRequestBase.h:
792 2011-04-06 David Hyatt <hyatt@apple.com>
794 Reviewed by Simon Fraser.
796 https://bugs.webkit.org/show_bug.cgi?id=57981
798 Update the column count and width computation algorithm for CSS3 multi-column layout
799 to match the revised pseudo-algorithm in the latest draft of the spec.
801 * rendering/RenderBlock.cpp:
802 (WebCore::RenderBlock::calcColumnWidth):
804 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
806 Reviewed by Eric Seidel.
808 borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
809 https://bugs.webkit.org/show_bug.cgi?id=57965
811 Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
812 from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
813 instead of marginStartForChild and marginEndForChild respectively.
815 Calling these two functions on RenderInline is okay because writing-mode cannot differ
816 from that of the containing block.
818 * rendering/RenderBlockLineLayout.cpp:
819 (WebCore::borderPaddingMarginStart):
820 (WebCore::borderPaddingMarginEnd):
821 (WebCore::inlineLogicalWidth):
823 2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com>
825 Unreviewed, rolling out r83039.
826 http://trac.webkit.org/changeset/83039
827 https://bugs.webkit.org/show_bug.cgi?id=57978
829 introduced a new regression in conjunction to
830 ReplaceSelectionCommand (Requested by rniwa on #webkit).
832 * editing/EditingStyle.cpp:
833 (WebCore::EditingStyle::init):
834 * editing/InsertParagraphSeparatorCommand.cpp:
835 (WebCore::InsertParagraphSeparatorCommand::doApply):
837 2011-04-06 Naoki Takano <takano.naoki@gmail.com>
839 Reviewed by David Levin.
841 Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
842 https://bugs.webkit.org/show_bug.cgi?id=27658
844 Test: fast/events/select-element.html
846 * dom/SelectElement.cpp:
847 (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
848 (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
849 (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
850 And converted to a normal static function from a private function of SelectElement.
851 (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
852 And converted to a normal static function from a private function of SelectElement.
853 (WebCore::firstSelectableListIndex): Returns the first selectable index.
854 (WebCore::lastSelectableListIndex): Returns the last selectable index.
855 (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
856 (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
858 * dom/SelectElement.h:
859 (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
861 * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
862 They can differ due to the minimum size imposed by RenderListBox.
864 2011-04-06 David Hyatt <hyatt@apple.com>
866 Reviewed by Dan Bernstein.
868 https://bugs.webkit.org/show_bug.cgi?id=57975
870 The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
871 to just look at the style, so that it can find the InlineTextBox and not care that it's a child
872 of the link element and not the line box for the link element itself (since that line box got
875 * rendering/RenderFlexibleBox.cpp:
876 (WebCore::RenderFlexibleBox::applyLineClamp):
878 2011-04-06 Brady Eidson <beidson@apple.com>
880 Reviewed by Anders Carlsson.
882 https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
883 WK2 icon database should be able to get a CGImage of a specific size
885 * platform/graphics/BitmapImage.h:
886 * platform/graphics/Image.h:
887 (WebCore::Image::getFirstCGImageRefOfSize):
889 * platform/graphics/cg/ImageCG.cpp:
890 (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
891 first frame of the requested size.
893 2011-04-06 Malcolm MacLeod <malcolm.macleod@tshwanedje.com>
895 Reviewed by Kevin Ollivier.
897 [wx] Fix cursor handling so that we always call the chrome to set it.
899 https://bugs.webkit.org/show_bug.cgi?id=57972
901 * platform/wx/WidgetWx.cpp:
902 (WebCore::Widget::setCursor):
904 2011-04-06 David Hyatt <hyatt@apple.com>
906 Reviewed by Dan Bernstein.
908 https://bugs.webkit.org/show_bug.cgi?id=41445
910 Visited links painting with black background. Make sure that if the visited style has
911 the initial background color (transparent) set that we just use the unvisited color.
913 Added fast/history/visited-link-background-color.html
915 * rendering/style/RenderStyle.cpp:
916 (WebCore::RenderStyle::visitedDependentColor):
918 2011-04-06 Csaba Osztrogonác <ossy@webkit.org>
920 Unreviewed Qt buildfix after r83079.
924 2011-04-06 Dean Jackson <dino@apple.com>
926 Reviewed by Chris Marrin.
928 https://bugs.webkit.org/show_bug.cgi?id=56936
929 Crash in ImplicitAnimation::~ImplicitAnimation
931 Make sure the style and start time waiting lists
932 are cleared in the CompositeAnimation destructor. This
933 way, no running transitions can be left in a state
934 where they are destroyed as the AnimationControllerPrivate
937 * page/animation/CompositeAnimation.cpp:
938 (WebCore::CompositeAnimation::~CompositeAnimation):
940 2011-04-06 Robert Sesek <rsesek@chromium.org>
942 Reviewed by Alexey Proskuryakov.
944 Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
945 https://bugs.webkit.org/show_bug.cgi?id=54969
947 No change in behavior; no new tests.
949 * editing/TextIterator.cpp:
950 (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
951 * editing/TextIterator.h:
953 (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
955 2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org>
957 Reviewed by Steve Block.
959 Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
960 https://bugs.webkit.org/show_bug.cgi?id=57770
962 Create a template from an existing functionality in JSGeolocationCustom.cpp
963 to be used by the custom bindings of both Geolocation and the Media Stream API.
964 V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
966 No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
968 * Android.jscbindings.mk:
973 * WebCore.vcproj/WebCore.vcproj:
974 * WebCore.xcodeproj/project.pbxproj:
975 * bindings/js/CallbackFunction.cpp: Added.
976 (WebCore::checkFunctionOnlyCallback):
977 * bindings/js/CallbackFunction.h: Added.
978 (WebCore::createFunctionOnlyCallback):
979 * bindings/js/JSBindingsAllInOne.cpp:
980 * bindings/js/JSGeolocationCustom.cpp:
981 (WebCore::JSGeolocation::getCurrentPosition):
982 (WebCore::JSGeolocation::watchPosition):
984 2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
986 Reviewed by Andreas Kling.
988 [Qt] Implement fullscreen playback for the GStreamer backend.
989 https://bugs.webkit.org/show_bug.cgi?id=56826
991 Implement support for fullscreen playback when building the
992 Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
993 The implementation is done in FullScreenVideoQt alongside with
994 the Qt Multimedia support.
996 No new tests because layout tests cover it. They are not yet activated
997 but will be any time soon.
999 * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
1000 * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
1001 (FullScreenVideoWindow::FullScreenVideoWindow):
1002 (FullScreenVideoWindow::setVideoElement):
1003 (FullScreenVideoWindow::closeEvent):
1004 (FullScreenVideoWindow::keyPressEvent):
1005 (FullScreenVideoWindow::event):
1006 (FullScreenVideoWindow::showFullScreen):
1007 (FullScreenVideoWindow::hideCursor):
1008 (FullScreenVideoWindow::showCursor):
1010 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
1012 Reviewed by Dimitri Glazkov.
1014 Bundle lineLeftOffset and lineRightOffset as a class
1015 https://bugs.webkit.org/show_bug.cgi?id=57851
1017 Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
1018 The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
1019 and only the difference is used to compute the width.
1021 * rendering/RenderBlock.h:
1022 * rendering/RenderBlockLineLayout.cpp:
1023 (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
1024 (WebCore::LineOffsets::LineOffsets): Added.
1025 (WebCore::LineOffsets::width): Added.
1026 (WebCore::LineOffsets::setLeft): Added.
1027 (WebCore::LineOffsets::setRight): Added.
1028 (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
1029 (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
1031 2011-04-06 David Hyatt <hyatt@apple.com>
1033 Reviewed by Dan Bernstein.
1035 https://bugs.webkit.org/show_bug.cgi?id=57916
1037 Implement an optimization to the line box tree to cull out most of the intermediate
1038 line boxes that can occur between the root line box and the leaves of the tree (images
1041 RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
1042 that starts off as false. Only if it gets flipped to true will there be any line boxes
1043 created for that RenderInline.
1045 * page/FocusController.cpp:
1046 (WebCore::FocusController::advanceFocusDirectionally):
1047 Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
1050 * page/SpatialNavigation.cpp:
1051 (WebCore::hasOffscreenRect):
1052 (WebCore::nodeRectInAbsoluteCoordinates):
1053 Add asserts in spatial navigation code to catch any future bad queries that might be made
1054 for rectangles without layout being up to date.
1056 * platform/graphics/FloatRect.cpp:
1057 (WebCore::FloatRect::uniteIfNonZero):
1058 * platform/graphics/FloatRect.h:
1059 * platform/graphics/IntRect.cpp:
1060 (WebCore::IntRect::uniteIfNonZero):
1061 * platform/graphics/IntRect.h:
1062 Add a new unite function that is useful for the render tree to FloatRect and IntRect. This
1063 version allows rect unites to happen if either width or height is nonzero.
1065 * rendering/HitTestResult.cpp:
1066 (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1067 Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
1068 if content inside those inlines is hit.
1070 * rendering/InlineBox.h:
1071 (WebCore::InlineBox::logicalFrameRect):
1072 Fix a bug in this function for obtaining the logical frame rect of an inline box.
1074 * rendering/InlineFlowBox.cpp:
1075 (WebCore::InlineFlowBox::addToLine):
1076 addToLine now also checks line gap in the line box tree optimization checks.
1078 (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1079 (WebCore::InlineFlowBox::computeOverflow):
1080 * rendering/InlineFlowBox.h:
1081 Rewritten to add the text box overflow to the text box itself.
1083 * rendering/InlineTextBox.cpp:
1084 (WebCore::InlineTextBox::destroy):
1085 Destroy has been changed to call a helper function to remove and destroy the line boxes that
1086 is now called from one additional spot.
1088 (WebCore::InlineTextBox::logicalOverflowRect):
1089 (WebCore::InlineTextBox::setLogicalOverflowRect):
1090 Text boxes now cache their own overflow in a global hash table.
1092 (WebCore::InlineTextBox::baselinePosition):
1093 (WebCore::InlineTextBox::lineHeight):
1094 Changed to not assume that the parent line box's renderer is the RenderText's immediate
1095 parent, since intermediate line boxes may have been culled.
1097 (WebCore::InlineTextBox::paint):
1098 Paint now properly checks only the text box overflow instead of the parent line box's overflow.
1100 * rendering/InlineTextBox.h:
1101 (WebCore::InlineTextBox::logicalTopVisualOverflow):
1102 (WebCore::InlineTextBox::logicalBottomVisualOverflow):
1103 (WebCore::InlineTextBox::logicalLeftVisualOverflow):
1104 (WebCore::InlineTextBox::logicalRightVisualOverflow):
1105 New accessors to obtain overflow for inline text boxes.
1107 * rendering/RenderBlock.cpp:
1108 (WebCore::RenderBlock::updateFirstLetter):
1109 updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
1110 text boxes may not have anything in between them and the block that contains the inline first letter
1113 * rendering/RenderBlockLineLayout.cpp:
1114 (WebCore::RenderBlock::createLineBoxes):
1115 The culling optimization is done here. Only if the RenderInline says that boxes are allowed will they
1118 (WebCore::RenderBlock::layoutInlineChildren):
1119 The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
1120 This is done before any lines are built.
1122 * rendering/RenderInline.cpp:
1123 (WebCore::RenderInline::RenderInline):
1124 The new m_alwaysCreateLineBoxes flag has been added to the constructor.
1126 (WebCore::RenderInline::styleDidChange):
1127 An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
1128 (like having a layer, borders, padding, margins or backgrounds). Some checks that depend on examining
1129 the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
1131 (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1132 The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
1133 vertical alignment, line height, etc.).
1135 (WebCore::RenderInline::absoluteRects):
1136 (WebCore::RenderInline::culledInlineAbsoluteRects):
1137 absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
1139 (WebCore::RenderInline::absoluteQuads):
1140 (WebCore::RenderInline::culledInlineAbsoluteQuads):
1141 absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
1143 (WebCore::RenderInline::offsetLeft):
1144 (WebCore::RenderInline::offsetTop):
1145 offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
1147 (WebCore::RenderInline::linesBoundingBox):
1148 (WebCore::RenderInline::culledInlineBoundingBox):
1149 lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
1151 (WebCore::RenderInline::culledInlineFirstLineBox):
1152 (WebCore::RenderInline::culledInlineLastLineBox):
1153 Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
1154 lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
1156 (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1157 (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1158 linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
1160 (WebCore::RenderInline::clippedOverflowRectForRepaint):
1161 The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
1163 (WebCore::RenderInline::dirtyLineBoxes):
1164 dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
1165 m_alwaysCreateLineBoxes is false.
1167 (WebCore::RenderInline::createAndAppendInlineFlowBox):
1168 Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
1169 when line-box-contain is set to an unusual value.
1171 (WebCore::RenderInline::addFocusRingRects):
1172 Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
1174 * rendering/RenderInline.h:
1175 (WebCore::RenderInline::firstLineBoxIncludingCulling):
1176 (WebCore::RenderInline::lastLineBoxIncludingCulling):
1177 Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
1178 is all that needs checking.
1180 (WebCore::RenderInline::alwaysCreateLineBoxes):
1181 (WebCore::RenderInline::setAlwaysCreateLineBoxes):
1182 Functions for getting and setting the m_alwaysCreateLineBoxes flag.
1184 * rendering/RenderLineBoxList.cpp:
1185 (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1186 Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
1189 * rendering/RenderText.cpp:
1190 (WebCore::RenderText::removeAndDestroyTextBoxes):
1191 New helper invoked by destroy and also from updateFirstLetter.
1193 (WebCore::RenderText::destroy):
1194 Changed to call removeAndDestroyTextBoxes.
1196 (WebCore::RenderText::absoluteRects):
1197 Fixed to be properly physical instead of logical.
1199 (WebCore::RenderText::linesVisualOverflowBoundingBox):
1200 New implementation for RenderText that gives the bounding box of the text boxes including overflow from
1201 shadows, glyphs, text-stroke, etc. Used by RenderInline::culledInlineVisualOverflowBoundingBox.
1203 * rendering/RenderText.h:
1204 * rendering/svg/RenderSVGInline.cpp:
1205 (WebCore::RenderSVGInline::RenderSVGInline):
1206 RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
1208 * rendering/svg/SVGRootInlineBox.cpp:
1209 (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
1210 (WebCore::SVGRootInlineBox::layoutChildBoxes):
1211 Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
1212 now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
1214 2011-04-05 Enrica Casucci <enrica@apple.com>
1216 Reviewed by Darin Adler.
1218 REGRESSION: Drag & Drop Gmail Attachments doesn't work.
1219 https://bugs.webkit.org/show_bug.cgi?id=57909
1220 <rdar://problem/9103220>
1222 In WebKit2 we cannot rely on the value returned by platformData() that
1223 on Mac returns an NSDraggingInfo object. This is available only in the UI
1224 process. Therefore we should use m_pasteboard instead.
1225 We cannot change what platformData() returns on Mac, since there are
1226 delegate methods that receive a NSDraggingInfo object (only in WebKit).
1228 * platform/DragData.h:
1229 (WebCore::DragData::pasteboard): Added.
1230 * platform/mac/ClipboardMac.mm:
1231 (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
1232 * platform/mac/DragDataMac.mm:
1233 (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
1234 (WebCore::DragData::asURL): Same as above.
1236 2011-04-06 Benjamin Poulain <benjamin.poulain@nokia.com>
1238 Reviewed by Darin Adler.
1240 ClipboardWin has unused variables "ExceptionCode ec"
1241 https://bugs.webkit.org/show_bug.cgi?id=57952
1243 Remove the unused variable.
1245 * platform/win/ClipboardWin.cpp:
1246 (WebCore::ClipboardWin::declareAndWriteDragImage):
1247 (WebCore::ClipboardWin::writePlainText):
1249 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
1251 Reviewed by Dimitri Glazkov.
1253 Split getBorderPaddingMargin into two functions
1254 https://bugs.webkit.org/show_bug.cgi?id=57947
1256 * rendering/RenderBlockLineLayout.cpp:
1257 (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
1258 (WebCore::borderPaddingMarginEnd): Ditto.
1259 (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
1260 (WebCore::RenderBlock::findNextLineBreak): Ditto.
1262 2011-04-06 MORITA Hajime <morrita@google.com>
1264 Reviewed by Dimitri Glazkov.
1266 [Refactoring] <progress> should not have manual layout code.
1267 https://bugs.webkit.org/show_bug.cgi?id=57801
1269 - Simplified RenderProgress, removing its custom layout code
1270 - Introducing ProgressValueElement and ProgressBarElement, replacing
1271 ProgressBarValueElement.
1273 Now the structure is almost identical to <meter>,
1275 - RenderProgress has animated painting, thus manages its own timer.
1276 - Both ProgressValueElement and ProgressBarElement has pseudo classes
1277 which don't changes during its lifetime.
1284 * WebCore.vcproj/WebCore.vcproj:
1285 * WebCore.xcodeproj/project.pbxproj:
1288 (progress::-webkit-progress-bar):
1289 (progress::-webkit-progress-value):
1290 * html/HTMLProgressElement.cpp:
1291 (WebCore::HTMLProgressElement::~HTMLProgressElement):
1292 (WebCore::HTMLProgressElement::create):
1293 (WebCore::HTMLProgressElement::attach):
1294 (WebCore::HTMLProgressElement::didElementStateChange):
1295 (WebCore::HTMLProgressElement::createShadowSubtree):
1296 * html/HTMLProgressElement.h:
1297 * html/shadow/ProgressShadowElement.cpp: Copied from Source/WebCore/html/shadow/ProgressBarValueElement.h.
1298 (WebCore::ProgressShadowElement::ProgressShadowElement):
1299 (WebCore::ProgressShadowElement::progressElement):
1300 (WebCore::ProgressShadowElement::rendererIsNeeded):
1301 (WebCore::ProgressBarElement::shadowPseudoId):
1302 (WebCore::ProgressValueElement::shadowPseudoId):
1303 (WebCore::ProgressValueElement::setWidthPercentage):
1304 * html/shadow/ProgressShadowElement.h: Renamed from Source/WebCore/html/shadow/ProgressBarValueElement.h.
1305 (WebCore::ProgressBarElement::ProgressBarElement):
1306 (WebCore::ProgressBarElement::create):
1307 (WebCore::ProgressValueElement::ProgressValueElement):
1308 (WebCore::ProgressValueElement::create):
1309 * rendering/RenderProgress.cpp:
1310 (WebCore::RenderProgress::RenderProgress):
1311 (WebCore::RenderProgress::updateFromElement):
1312 (WebCore::RenderProgress::animationTimerFired):
1313 * rendering/RenderProgress.h:
1314 (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
1315 (WebCore::RenderProgress::canHaveChildren):
1317 2011-04-06 Mario Sanchez Prada <msanchez@igalia.com>
1319 Reviewed by Chris Fleizach.
1321 [GTK] Do not reference AccessibilityRenderObject from platform dependent code
1322 https://bugs.webkit.org/show_bug.cgi?id=57955
1324 Do not reference AccessibilityRenderObject from platform specific code
1326 Added new virtual functions to AccessibilityObject.h and removed
1327 explicit references to AccessibilityRenderObject from GTK code.
1329 * accessibility/AccessibilityObject.h:
1330 (WebCore::AccessibilityObject::renderer): New virtual method,
1331 returning 0 by default. Overriden by AccessibilityRenderObject.
1332 (WebCore::AccessibilityObject::correspondingLabelForControlElement):
1333 New virtual method, returning 0 by default. It complements the
1334 already present method correspondingControlForLabelElement().
1336 * accessibility/AccessibilityRenderObject.h:
1337 (WebCore::AccessibilityRenderObject::renderer): Made virtual.
1339 * accessibility/gtk/AXObjectCacheAtk.cpp:
1340 (WebCore::emitTextChanged): Reference AccessibilityObject,
1341 instead of AccessibilityRenderObject.
1342 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1345 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1346 (webkit_accessible_get_name): Do not reference
1347 AccessibilityRenderObject.
1348 (webkit_accessible_get_description): Ditto.
1349 (setAtkRelationSetFromCoreObject): Ditto.
1350 (optionFromList): Ditto.
1351 (optionFromSelection): Ditto.
1352 (webkit_accessible_selection_clear_selection): Ditto.
1353 (webkit_accessible_selection_get_selection_count): Ditto.
1354 (webkit_accessible_selection_select_all_selection): Ditto.
1355 (textForObject): Ditto.
1356 (webkit_accessible_text_get_text): Ditto.
1357 (getPangoLayoutForAtk): Ditto.
1358 (webkit_accessible_text_get_caret_offset): Ditto.
1359 (baselinePositionForRenderObject): Ditto.
1360 (getAttributeSetForAccessibilityObject): Ditto.
1361 (accessibilityObjectLength): Ditto.
1362 (getSelectionOffsetsForObject): Ditto.
1363 (webkit_accessible_text_set_selection): Ditto.
1364 (webkit_accessible_text_set_caret_offset): Ditto.
1365 (webkit_accessible_table_get_caption): Ditto.
1366 (getInterfaceMaskFromObject): Ditto.
1368 * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
1369 (getRangeLengthForObject): Ditto.
1371 Removed unused renderer() method from AccessibilityMenuList.
1373 * accessibility/AccessibilityMenuList.h: Removed unused method.
1374 * accessibility/AccessibilityMenuList.cpp: Removed unused method.
1376 2011-04-06 Alexander Pavlov <apavlov@chromium.org>
1378 Reviewed by Pavel Feldman.
1380 Web Inspector: Javascipt warning link expand and overlap with icons in js console
1381 https://bugs.webkit.org/show_bug.cgi?id=57939
1383 * inspector/front-end/inspector.js:
1384 (WebInspector.linkifyURLAsNode):
1386 2011-04-06 Alexander Pavlov <apavlov@chromium.org>
1388 Reviewed by Pavel Feldman.
1390 Web Inspector: Beautify parameter names in Inspector.json (CSS domain)
1391 https://bugs.webkit.org/show_bug.cgi?id=57931
1393 * inspector/Inspector.json:
1395 2011-04-06 Jia Pu <jpu@apple.com>
1397 Reviewed by Darin Adler.
1399 [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
1400 https://bugs.webkit.org/show_bug.cgi?id=57665
1401 <rdar://problem/7350477>
1403 We need to track how user modified an autocorrected word. If he changed it back to original
1404 text, we want to record AutocorrectionReverted response. And if he changed it to something
1405 else, we want to record AutocorrectionEdited response.
1407 To achieve this, we need to distringuish between text replacement caused by autocorrection
1408 from that due to other causes, such as reversion, text substitution, etc. So we added a new
1409 marker type "Autocorrected". We also need to be able to check for correction, even when we
1410 don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
1411 value, "CheckForCorrection".
1413 We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
1414 specified range, and of specified type.
1416 * dom/DocumentMarker.h:
1417 * dom/DocumentMarkerController.cpp:
1418 (WebCore::DocumentMarkerController::markersInRange):
1419 (WebCore::DocumentMarkerController::hasMarkers):
1420 * dom/DocumentMarkerController.h:
1421 * editing/Editor.cpp:
1422 (WebCore::markerTypesForAutocorrection):
1423 (WebCore::markersHaveIdenticalDescription):
1424 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1425 (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
1426 (WebCore::Editor::changeBackToReplacedString):
1427 (WebCore::Editor::markMisspellingsAndBadGrammar):
1428 (WebCore::Editor::applyCorrectionPanelInfo):
1429 (WebCore::Editor::unappliedSpellCorrection):
1430 (WebCore::Editor::textCheckingTypeMaskFor):
1432 * editing/SpellingCorrectionCommand.cpp:
1433 (WebCore::SpellingCorrectionCommand::doApply):
1435 2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com>
1437 Unreviewed, rolling out r83045.
1438 http://trac.webkit.org/changeset/83045
1439 https://bugs.webkit.org/show_bug.cgi?id=57953
1441 Broke win layout tests (Requested by podivilov on #webkit).
1444 * inspector/front-end/DebuggerPresentationModel.js:
1445 (WebInspector.DebuggerPresentationModel.prototype._addScript):
1446 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1448 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
1450 Moved the declaration of positionNewFloatOnLine in RenderBlock.h after r83042.
1452 * rendering/RenderBlock.h:
1454 2011-03-27 Diego Gonzalez <diegohcg@webkit.org>
1456 Reviewed by Kenneth Rohde Christiansen.
1458 [Qt] Re-draw the <input> fields for Qt Mobile Theme to do not override elements already styled.
1459 https://bugs.webkit.org/show_bug.cgi?id=57007
1461 * CodeGenerators.pri:
1462 * css/themeQtMobile.css: Removed.
1463 * platform/qt/QtMobileWebStyle.cpp:
1464 (drawRectangularControlBackground):
1465 (QtMobileWebStyle::drawPrimitive):
1466 (QtMobileWebStyle::drawComplexControl):
1467 * platform/qt/QtMobileWebStyle.h:
1468 * platform/qt/RenderThemeQt.cpp:
1469 (WebCore::RenderThemeQt::isControlStyled):
1470 (WebCore::RenderThemeQt::paintTextField):
1472 2011-04-06 Jia Pu <jpu@apple.com>
1474 Reviewed by Darin Adler.
1476 [Mac] When autocorrection occurs without showing correction panel, WebCore need to post accessibility notification.
1477 https://bugs.webkit.org/show_bug.cgi?id=57800
1478 <rdar://problem/9218223>
1480 Defined a new accessibility notification type, AXAutocorrectionOccured. Editor::markAllMisspellingsAndBadGrammarInRanges()
1481 now posts said notification when any autocorrection or text replacement (e.g. replacing "(c)" with copyright mark) takes place.
1483 * accessibility/AXObjectCache.h:
1484 * accessibility/chromium/AXObjectCacheChromium.cpp:
1485 (WebCore::AXObjectCache::postPlatformNotification):
1486 * accessibility/mac/AXObjectCacheMac.mm:
1487 (WebCore::AXObjectCache::postPlatformNotification):
1488 * editing/Editor.cpp:
1489 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1491 2011-04-06 Martin Robinson <mrobinson@igalia.com>
1493 Build fix for debug Cairo builds.
1495 * platform/graphics/cairo/PlatformContextCairo.cpp:
1496 (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
1498 2011-04-06 Diego Gonzalez <diegohcg@webkit.org>
1500 Reviewed by Antonio Gomes.
1502 [Qt] Style fix for QtMobileWebStyle.h
1503 https://bugs.webkit.org/show_bug.cgi?id=57708
1505 * platform/qt/QtMobileWebStyle.h:
1507 2011-04-06 Andras Becsi <abecsi@webkit.org>
1509 Reviewed by Darin Adler.
1511 Invalid color #{predefined colorName} is accepted by the CSS parser.
1512 https://bugs.webkit.org/show_bug.cgi?id=15360
1514 Test: fast/css/invalid-predefined-color.html
1516 * css/CSSGrammar.y: Remove superfluous hexcolor production.
1517 * css/tokenizer.flex: A hexadecimal number should consist of [a-fA-F0-9] values ({h}).
1519 2011-03-30 Pavel Podivilov <podivilov@chromium.org>
1521 Reviewed by Pavel Feldman.
1523 Web Inspector: add test for script formatter worker.
1524 https://bugs.webkit.org/show_bug.cgi?id=57447
1526 Test: inspector/debugger/script-formatter.html
1529 * inspector/front-end/DebuggerPresentationModel.js:
1530 (WebInspector.DebuggerPresentationModel):
1531 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1533 2011-04-06 Martin Robinson <mrobinson@igalia.com>
1535 Reviewed by Xan Lopez.
1537 [Cairo] Hide the details of image masking in PlatformContextCairo
1538 https://bugs.webkit.org/show_bug.cgi?id=57878
1540 No new tests. This is just a refactor.
1542 * platform/graphics/GraphicsContext.h:
1543 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1544 (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
1545 do the actual cairo_save. Remove information about image masking.
1546 (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
1547 do the actual cairo_restore. Remove information about image masking.
1548 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1549 * platform/graphics/cairo/ImageBufferCairo.cpp:
1550 (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
1551 * platform/graphics/cairo/PlatformContextCairo.cpp:
1552 (WebCore::PlatformContextCairo::restore): Added.
1553 (WebCore::PlatformContextCairo::save): Added.
1554 (WebCore::PlatformContextCairo::pushImageMask): Added.
1555 * platform/graphics/cairo/PlatformContextCairo.h:
1556 (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
1557 (WebCore::ImageMaskInformation::isValid): Ditto.
1558 (WebCore::ImageMaskInformation::maskSurface): Ditto.
1559 (WebCore::ImageMaskInformation::maskRect): Ditto.
1561 2011-04-02 Diego Gonzalez <diegohcg@webkit.org>
1563 Reviewed by Csaba Osztrogonác.
1565 [Qt] Radio buttons are showing wrong with mobile theme
1566 https://bugs.webkit.org/show_bug.cgi?id=57706
1568 * platform/qt/QtMobileWebStyle.cpp:
1569 (QtMobileWebStyle::drawRadio):
1571 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
1573 Reviewed by Eric Seidel.
1575 Move RenderBlock::positionNewFloatOnLine to RenderBlockLineLayout.cpp
1576 https://bugs.webkit.org/show_bug.cgi?id=57943
1578 * rendering/RenderBlock.cpp: Removed positionNewFloatOnLine.
1579 * rendering/RenderBlockLineLayout.cpp:
1580 (WebCore::RenderBlock::positionNewFloatOnLine): Moved from RenderBlock.cpp
1582 2011-04-05 Diego Gonzalez <diegohcg@webkit.org>
1584 Buildfix after r82125.
1586 [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
1587 https://bugs.webkit.org/show_bug.cgi?id=57087
1589 * platform/qt/QtMobileWebStyle.cpp:
1590 (QtMobileWebStyle::findChecker):
1591 (QtMobileWebStyle::findRadio):
1592 (QtMobileWebStyle::findComboButton):
1594 2011-04-06 Pavel Podivilov <podivilov@chromium.org>
1596 Reviewed by Yury Semikhatsky.
1598 Web Inspector: inline script imports in ScriptFormatterWorker.js so it works in Safari release.
1599 https://bugs.webkit.org/show_bug.cgi?id=57641
1601 * WebCore.xcodeproj/project.pbxproj:
1602 * gyp/streamline-inspector-source.sh:
1603 * inspector/combine-javascript-resources.pl: Renamed from Source/WebCore/combine-javascript-resources.
1604 * inspector/inline-javascript-imports.py: Added.
1606 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
1608 Reviewed by Eric Seidel.
1610 REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1611 https://bugs.webkit.org/show_bug.cgi?id=57872
1613 r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1614 because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1616 r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1617 avoiding the tab span.
1619 Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1621 Test: editing/inserting/insert-paragraph-separator-tab-span.html
1623 * editing/EditingStyle.cpp:
1624 (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1625 * editing/InsertParagraphSeparatorCommand.cpp:
1626 (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1627 separator into a paragraph separator.
1629 2011-04-06 Levi Weintraub <leviw@chromium.org>
1631 Reviewed by Ryosuke Niwa.
1633 Add member functions for determining line/paragraph separation to InlineIterator
1634 https://bugs.webkit.org/show_bug.cgi?id=57938
1636 Adding atTextParagraphSeparator and atParagraphSeparator inline convenience functions to
1637 InlineIterator, where it makes far more sense for them to be. Also moving
1638 shouldPreserveNewline to RenderObject and renaming it preservesNewline.
1640 No new tests as this provides no new functionality.
1642 * rendering/InlineIterator.h:
1643 (WebCore::InlineIterator::atTextParagraphSeparator):
1644 (WebCore::InlineIterator::atParagraphSeparator):
1645 * rendering/RenderBlockLineLayout.cpp:
1646 (WebCore::RenderBlock::requiresLineBox):
1647 (WebCore::RenderBlock::findNextLineBreak):
1648 * rendering/RenderObject.h:
1649 (WebCore::RenderObject::preservesNewline):
1651 2011-04-05 Alexander Pavlov <apavlov@chromium.org>
1653 Reviewed by Pavel Feldman.
1655 Web Inspector: Range insertNode function does not update content in the inspector
1656 https://bugs.webkit.org/show_bug.cgi?id=57829
1658 * inspector/InspectorDOMAgent.cpp:
1659 (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
1660 (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
1662 2011-04-06 Alejandro G. Castro <alex@igalia.com>
1664 Fix GTK3 compilation after r82962.
1666 * platform/gtk/RenderThemeGtk3.cpp:
1667 (WebCore::paintToggle):
1668 (WebCore::renderButton):
1669 (WebCore::RenderThemeGtk::paintMenuList):
1670 (WebCore::RenderThemeGtk::paintTextField):
1671 (WebCore::RenderThemeGtk::paintSliderTrack):
1672 (WebCore::RenderThemeGtk::paintSliderThumb):
1673 (WebCore::RenderThemeGtk::paintProgressBar):
1674 (WebCore::paintSpinArrowButton):
1675 * platform/gtk/ScrollbarThemeGtk3.cpp:
1676 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1677 (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
1678 (WebCore::ScrollbarThemeGtk::paintThumb):
1679 (WebCore::ScrollbarThemeGtk::paintButton):
1681 2011-04-06 Andrey Kosyakov <caseq@chromium.org>
1683 Reviewed by Yury Semikhatsky.
1685 Web Inspector: [Extensions API] remove inspectedPage.* events
1686 https://bugs.webkit.org/show_bug.cgi?id=57763
1688 - Removed webInspector.inspectedPage.* events
1689 - moved onNavigated to webInspector.resources
1691 * inspector/front-end/ExtensionAPI.js:
1692 (WebInspector.injectedExtensionAPI):
1693 (WebInspector.injectedExtensionAPI.InspectedWindow):
1694 * inspector/front-end/ExtensionAPISchema.json:
1695 * inspector/front-end/ExtensionServer.js:
1696 (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
1697 * inspector/front-end/inspector.js:
1698 (WebInspector.domContentEventFired):
1699 (WebInspector.loadEventFired):
1700 (WebInspector.inspectedURLChanged):
1702 2011-04-06 Joseph Pecoraro <joepeck@webkit.org>
1704 Reviewed by Antti Koivisto.
1706 Add <head> to the simpleUserAgentStyleSheet
1707 https://bugs.webkit.org/show_bug.cgi?id=57915
1709 * css/CSSStyleSelector.cpp:
1710 (WebCore::elementCanUseSimpleDefaultStyle): add head to the
1711 simple stylesheet, display:none.
1713 2011-04-05 Mikhail Naganov <mnaganov@chromium.org>
1715 Reviewed by Pavel Feldman.
1717 Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
1718 https://bugs.webkit.org/show_bug.cgi?id=57856
1720 Test: inspector/profiler/detailed-heapshots-summary.html
1722 * inspector/front-end/DataGrid.js:
1723 (WebInspector.DataGrid):
1724 * inspector/front-end/DetailedHeapshotGridNodes.js:
1725 (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
1726 (WebInspector.HeapSnapshotGridNode.prototype._populate):
1727 (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1728 (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1729 (WebInspector.HeapSnapshotGridNode.prototype.sort):
1730 (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
1731 * inspector/front-end/DetailedHeapshotView.js:
1732 (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
1733 * inspector/front-end/ProfilesPanel.js:
1734 (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
1735 (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
1737 2011-04-06 Anders Bakken <agbakken@gmail.com>
1739 Reviewed by David Levin.
1741 [Qt] SmartReplaceQt.cpp has coding-style errors
1742 https://bugs.webkit.org/show_bug.cgi?id=40261
1744 This patch does not require new test cases.
1746 * editing/qt/SmartReplaceQt.cpp:
1747 (WebCore::isCharacterSmartReplaceExempt):
1749 2011-04-06 Naoki Takano <takano.naoki@gmail.com>
1751 Reviewed by Ryosuke Niwa.
1753 REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
1754 https://bugs.webkit.org/show_bug.cgi?id=57755
1756 Test: editing/execCommand/insert-line-break-onload.html
1758 * editing/TypingCommand.cpp:
1759 (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
1761 2011-04-05 Antti Koivisto <antti@apple.com>
1763 Reviewed by Cameron Zwarich.
1765 Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
1766 https://bugs.webkit.org/show_bug.cgi?id=57914
1768 Don't call adjustedDeferredRepaintDelay unnecessarily.
1770 * page/FrameView.cpp:
1771 (WebCore::FrameView::repaintContentRectangle):
1772 (WebCore::FrameView::adjustedDeferredRepaintDelay):
1774 2011-04-05 Steve VanDeBogart <vandebo@chromium.org>
1776 Reviewed by David Levin.
1778 Update call to SkAdvancedTypefaceMetrics to new API.
1779 https://bugs.webkit.org/show_bug.cgi?id=57887
1781 * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1782 (WebCore::FontPlatformData::emSizeInFontUnits):
1784 2011-04-05 Alexey Proskuryakov <ap@apple.com>
1786 Reviewed by Darin Adler.
1788 Rename event dispatching functions after form event removal
1789 https://bugs.webkit.org/show_bug.cgi?id=57908
1791 * dom/InputElement.cpp:
1792 (WebCore::InputElement::setValueFromRenderer):
1794 (WebCore::Node::dispatchChangeEvent):
1795 (WebCore::Node::dispatchInputEvent):
1796 (WebCore::Node::defaultEventHandler):
1798 * html/HTMLFormControlElement.cpp:
1799 (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1800 (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
1801 (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
1802 Renamed "events" to "event", since there is only one event to dispatch now.
1804 2011-04-05 Anders Bakken <agbakken@gmail.com>
1806 Reviewed by David Levin.
1808 [Qt] DragControllerQt.cpp has coding-style errors
1809 https://bugs.webkit.org/show_bug.cgi?id=40258
1811 This patch does not require new test cases.
1813 * page/qt/DragControllerQt.cpp:
1814 (WebCore::DragController::dragOperation):
1816 2011-04-05 Steve VanDeBogart <vandebo@chromium.org>
1818 Reviewed by David Levin.
1820 Update deprecated include: platform_canvas_win.h to platform_canvas.h.
1821 https://bugs.webkit.org/show_bug.cgi?id=57896
1823 * platform/graphics/chromium/FontChromiumWin.cpp:
1825 2011-04-05 Darin Adler <darin@apple.com>
1827 Try to fix Leopard bots.
1829 * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
1830 to have intended it.
1832 2011-04-05 Darin Adler <darin@apple.com>
1834 Try to fix Leopard bots.
1836 * platform/mac/HTMLConverter.mm: Move declarations of new functions
1837 inside the appropriate #if.
1839 2011-04-05 Adrienne Walker <enne@google.com>
1841 Reviewed by Tony Chang.
1843 Correctly set color when using skia's fillRoundedRect.
1844 https://bugs.webkit.org/show_bug.cgi?id=57907
1846 * platform/graphics/skia/GraphicsContextSkia.cpp:
1847 (WebCore::GraphicsContext::fillRoundedRect):
1849 2011-04-05 Alexey Proskuryakov <ap@apple.com>
1851 Reviewed by Darin Adler.
1853 Move attributedStringFromRange down to WebCore
1854 https://bugs.webkit.org/show_bug.cgi?id=57905
1856 No change in behavior, so no new tests.
1858 Also tweaked HTMLConverter to not use methods defined in WebKit.
1861 * WebCore.xcodeproj/project.pbxproj:
1862 * platform/mac/HTMLConverter.h:
1863 * platform/mac/HTMLConverter.mm:
1864 (-[WebHTMLConverter _newTabForElement:]):
1865 (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1866 (+[WebHTMLConverter editingAttributedStringFromRange:]):
1867 (fileWrapperForURL):
1868 (fileWrapperForElement):
1869 * platform/mac/PasteboardMac.mm:
1870 (WebCore::Pasteboard::writeSelection):
1871 * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
1872 * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
1873 (WebCore::attributedStringByStrippingAttachmentCharacters):
1875 2011-04-05 Simon Fraser <simon.fraser@apple.com>
1877 Reviewed by Darin Adler.
1879 Rename variables in border drawing code for readability
1880 https://bugs.webkit.org/show_bug.cgi?id=57894
1882 * rendering/RenderObject.cpp:
1883 (WebCore::RenderObject::drawLineForBoxSide):
1884 (WebCore::RenderObject::drawBoxSideFromPath):
1885 (WebCore::RenderObject::drawArcForBoxSide):
1887 2011-04-05 Antti Koivisto <antti@apple.com>
1889 Reviewed by Darin Adler.
1891 Defer repaints during style recalc
1892 https://bugs.webkit.org/show_bug.cgi?id=57886
1894 This reduces the need to do (often expensive) platform surface invalidation.
1895 We already do this during layout but style recalculation may trigger
1896 invalidation as well.
1899 (WebCore::Document::recalcStyle):
1901 2011-04-05 Jer Noble <jer.noble@apple.com>
1903 Reviewed by Darin Adler.
1905 HTML5 Player Has no Fullscreen Mode
1906 https://bugs.webkit.org/show_bug.cgi?id=57795
1908 * html/HTMLVideoElement.cpp:
1909 (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
1910 supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
1912 2011-04-05 Vsevolod Vlasov <vsevik@chromium.org>
1914 Reviewed by Pavel Feldman.
1916 Web Inspector: fix data url's status and timing the network panel.
1917 https://bugs.webkit.org/show_bug.cgi?id=53066
1919 Added data url support for status of network resources.
1921 * English.lproj/localizedStrings.js:
1922 * inspector/front-end/NetworkPanel.js:
1923 (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
1924 * inspector/front-end/Resource.js:
1925 (WebInspector.Resource.prototype.isDataURL):
1927 2011-04-04 Vitaly Repeshko <vitalyr@chromium.org>
1929 Reviewed by Adam Barth.
1931 [V8] Keep dirty primitive CSS values alive.
1932 https://bugs.webkit.org/show_bug.cgi?id=57810
1934 * bindings/v8/V8GCController.cpp:
1935 (WebCore::GrouperVisitor::visitDOMWrapper):
1937 2011-04-05 Simon Fraser <simon.fraser@apple.com>
1939 Reviewed by Adele Peterson.
1941 Add a fast path for simple color backgrounds
1942 https://bugs.webkit.org/show_bug.cgi?id=57773
1944 Add a fast path for drawing simple color backgrounds. It's
1945 faster to fill a path or rect than it is to set up a clip,
1946 and then paint the rect.
1948 No visible behavior change so no new tests.
1950 * rendering/RenderBoxModelObject.cpp:
1951 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1953 2011-04-05 Patrick Gansterer <paroga@webkit.org>
1955 Unreviewed EFL build fix for r82962.
1957 * CMakeListsEfl.txt:
1959 2011-04-05 Chris Rogers <crogers@google.com>
1961 Reviewed by Kenneth Russell.
1963 Add support for offline audio rendering to AudioContext API
1964 https://bugs.webkit.org/show_bug.cgi?id=57676
1966 No new tests since audio API is not yet implemented.
1968 * DerivedSources.make:
1970 * WebCore.xcodeproj/project.pbxproj:
1971 * bindings/js/JSAudioContextCustom.cpp:
1972 (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1973 * bindings/js/JSEventCustom.cpp:
1975 * bindings/js/JSEventTarget.cpp:
1977 * bindings/v8/V8DOMWrapper.cpp:
1978 (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1979 * bindings/v8/custom/V8AudioContextCustom.cpp:
1980 (WebCore::V8AudioContext::constructorCallback):
1981 * bindings/v8/custom/V8EventCustom.cpp:
1984 (WebCore::Event::isOfflineAudioCompletionEvent):
1986 * dom/EventTarget.cpp:
1987 (WebCore::EventTarget::toAudioContext):
1988 * dom/EventTarget.h:
1989 * platform/audio/HRTFDatabaseLoader.cpp:
1990 (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1991 * platform/audio/HRTFDatabaseLoader.h:
1992 (WebCore::HRTFDatabaseLoader::loader):
1993 * webaudio/AudioContext.cpp:
1994 (WebCore::AudioContext::createOfflineContext):
1995 (WebCore::AudioContext::AudioContext):
1996 (WebCore::AudioContext::constructCommon):
1997 (WebCore::AudioContext::document):
1998 (WebCore::AudioContext::scriptExecutionContext):
1999 (WebCore::AudioContext::toAudioContext):
2000 (WebCore::AudioContext::startRendering):
2001 (WebCore::AudioContext::fireCompletionEvent):
2002 * webaudio/AudioContext.h:
2003 (WebCore::AudioContext::isOfflineContext):
2004 (WebCore::AudioContext::eventTargetData):
2005 (WebCore::AudioContext::ensureEventTargetData):
2006 (WebCore::AudioContext::refEventTarget):
2007 (WebCore::AudioContext::derefEventTarget):
2008 * webaudio/AudioContext.idl:
2009 * webaudio/AudioDestinationNode.cpp:
2010 (WebCore::AudioDestinationNode::AudioDestinationNode):
2011 * webaudio/AudioDestinationNode.h:
2012 (WebCore::AudioDestinationNode::reset):
2013 (WebCore::AudioDestinationNode::numberOfChannels):
2014 * webaudio/ConvolverNode.cpp:
2015 (WebCore::ConvolverNode::setBuffer):
2016 * webaudio/DefaultAudioDestinationNode.cpp: Added.
2017 (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
2018 (WebCore::DefaultAudioDestinationNode::~DefaultAudioDestinationNode):
2019 (WebCore::DefaultAudioDestinationNode::initialize):
2020 (WebCore::DefaultAudioDestinationNode::uninitialize):
2021 (WebCore::DefaultAudioDestinationNode::startRendering):
2022 * webaudio/DefaultAudioDestinationNode.h: Added.
2023 (WebCore::DefaultAudioDestinationNode::create):
2024 (WebCore::DefaultAudioDestinationNode::sampleRate):
2025 * webaudio/OfflineAudioCompletionEvent.cpp: Added.
2026 (WebCore::OfflineAudioCompletionEvent::create):
2027 (WebCore::OfflineAudioCompletionEvent::OfflineAudioCompletionEvent):
2028 (WebCore::OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent):
2029 (WebCore::OfflineAudioCompletionEvent::isOfflineAudioCompletionEvent):
2030 * webaudio/OfflineAudioCompletionEvent.h: Added.
2031 (WebCore::OfflineAudioCompletionEvent::renderedBuffer):
2032 * webaudio/OfflineAudioCompletionEvent.idl: Added.
2033 * webaudio/OfflineAudioDestinationNode.cpp: Added.
2034 (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
2035 (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode):
2036 (WebCore::OfflineAudioDestinationNode::initialize):
2037 (WebCore::OfflineAudioDestinationNode::uninitialize):
2038 (WebCore::OfflineAudioDestinationNode::startRendering):
2039 (WebCore::OfflineAudioDestinationNode::renderEntry):
2040 (WebCore::OfflineAudioDestinationNode::render):
2041 (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch):
2042 (WebCore::OfflineAudioDestinationNode::notifyComplete):
2043 * webaudio/OfflineAudioDestinationNode.h: Added.
2044 (WebCore::OfflineAudioDestinationNode::create):
2045 (WebCore::OfflineAudioDestinationNode::sampleRate):
2047 2011-04-05 Martin Robinson <mrobinson@igalia.com>
2049 Reviewed by Eric Seidel.
2051 [Cairo] Better separate the concerns of GraphicsContextCairo
2052 https://bugs.webkit.org/show_bug.cgi?id=55150
2054 Add a PlatformContextCairo which right now stores the cairo_t* for a
2055 GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
2056 and image masking layers into this PlatformContextCairo class.
2058 No new tests. This patch is only a code cleanup.
2061 * platform/graphics/GraphicsContext.h: The platform context is no longer a
2062 cairo_t, but our new class the PlatformContextCairo.
2063 * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j
2064 * platform/graphics/cairo/FontCairo.cpp: Ditto.
2065 * platform/graphics/cairo/GradientCairo.cpp: Ditto.
2066 * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical
2067 changes which now reference platformContext()->cr() to get the cairo_t.
2068 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the
2069 PlatformContextCairo instead of the cairo_t.
2070 * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class.
2071 * platform/graphics/cairo/ImageCairo.cpp: Ditto.
2072 * platform/graphics/cairo/PathCairo.cpp: Ditto.
2073 * platform/graphics/cairo/PlatformContextCairo.cpp: Added.
2074 * platform/graphics/cairo/PlatformContextCairo.h: Added.
2075 * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class.
2076 * platform/graphics/gtk/IconGtk.cpp: Ditto.
2077 * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out
2078 m_data with a private section containing the platform context instead of
2080 * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class.
2081 * platform/gtk/WidgetRenderingContext.cpp: Ditto.
2082 (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto.
2083 * plugins/gtk/PluginViewGtk.cpp: Ditto.
2085 2011-04-05 David Dorwin <ddorwin@chromium.org>
2087 Reviewed by David Levin.
2089 Fullscreen code assumes all layers use GPU compositing when USE(ACCELERATED_COMPOSITING)
2090 https://bugs.webkit.org/show_bug.cgi?id=57400
2092 Check whether the full screen renderer layer is being composited by the GPU before assuming that the backing is valid.
2093 Accelerated compositing may be compiled in but disabled at runtime or for some elements.
2095 Tests: Fullscreen layout tests on Chromium.
2098 (WebCore::Document::webkitWillEnterFullScreenForElement):
2099 (WebCore::Document::webkitDidEnterFullScreenForElement):
2100 (WebCore::Document::webkitWillExitFullScreenForElement):
2102 2011-04-05 Nikolas Zimmermann <nzimmermann@rim.com>
2104 Reviewed by Dirk Schulze.
2106 Regression: Invalid write in SVGTextLayoutEngine
2107 https://bugs.webkit.org/show_bug.cgi?id=57721
2109 Properly stop layout if all metrics object refer to zero-width/height characters,
2110 which can happen for instance when using <text font-size="0">.
2112 Test: svg/text/font-size-null-assertion.svg
2114 * rendering/svg/SVGTextLayoutEngine.cpp:
2115 (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
2116 (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
2118 2011-04-04 MORITA Hajime <morrita@google.com>
2120 Reviewed by Ryosuke Niwa.
2122 [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
2123 https://bugs.webkit.org/show_bug.cgi?id=56085
2125 Removed WebCore::SpellCheckingResult and replaced it with TextCheckingResult.
2126 This change also added TextCheckerClient::requestCheckingOfString() should have
2127 TextCheckingTypeMask as a parameter to control text checking type.
2130 * editing/Editor.cpp:
2131 (WebCore::Editor::replaceSelectionWithFragment):
2132 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2133 (WebCore::Editor::textCheckingTypeMaskFor): Extracted from markAllMisspellingsAndBadGrammarInRanges()
2134 * editing/SpellChecker.cpp:
2135 (WebCore::SpellChecker::requestCheckingFor): Added a parameter.
2136 (WebCore::SpellChecker::markAt): Extracted from didCheck(), Added a check for the GrammarDetail object.
2137 (WebCore::SpellChecker::didCheck):
2138 * editing/SpellChecker.h:
2139 * loader/EmptyClients.h:
2140 (WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
2141 (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
2142 * platform/text/TextCheckerClient.h:
2144 2011-04-04 Antti Koivisto <antti@apple.com>
2146 Reviewed by Sam Weinig.
2148 Print stylesheet on nytimes.com loads too early
2149 https://bugs.webkit.org/show_bug.cgi?id=57814
2151 Don't load resources with Very Low priority until there are no other resources to
2152 load for the host (or until document is complete enough that we stop limiting requests).
2154 No tests, this is difficult to observe reliably with our current testing infrastructure.
2155 Verified working with Wireshark.
2157 * loader/ResourceLoadScheduler.cpp:
2158 (WebCore::ResourceLoadScheduler::servePendingRequests):
2159 (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
2160 * loader/ResourceLoadScheduler.h:
2162 2011-04-04 Steve Block <steveblock@google.com>
2164 Reviewed by Dimitri Glazkov.
2166 JavaInstance should be a pure interface
2167 https://bugs.webkit.org/show_bug.cgi?id=55383
2169 This patch fixes JavaInstance for V8 only.
2171 It factors out a JavaInstance interface which does not use JNI
2172 types. This will allow the Java bridge to be used with objects
2173 that don't use JNI directly. The existing jobject-backed
2174 implementation is moved to a new JavaInstanceJobject class which
2175 implements the interface.
2177 No new tests, refactoring only.
2179 * Android.v8bindings.mk:
2181 * bridge/jni/JobjectWrapper.h:
2182 * bridge/jni/v8/JNIUtilityPrivate.cpp:
2183 (JSC::Bindings::jvalueToJavaValue):
2184 (JSC::Bindings::javaValueToJvalue):
2185 * bridge/jni/v8/JavaInstanceJobjectV8.cpp:
2186 (JavaInstanceJobject::JavaInstanceJobject):
2187 (JavaInstanceJobject::~JavaInstanceJobject):
2188 (JavaInstanceJobject::begin):
2189 (JavaInstanceJobject::end):
2190 (JavaInstanceJobject::getClass):
2191 (JavaInstanceJobject::invokeMethod):
2192 (JavaInstanceJobject::getField):
2193 * bridge/jni/v8/JavaInstanceJobjectV8.h: Copied from Source/WebCore/bridge/jni/v8/JavaInstanceV8.h.
2194 (JSC::Bindings::JavaInstanceJobject::javaInstance):
2195 * bridge/jni/v8/JavaInstanceV8.h:
2196 (JSC::Bindings::JavaInstance::~JavaInstance):
2198 2011-04-05 Dimitri Glazkov <dglazkov@chromium.org>
2200 Reviewed by Darin Adler.
2202 Move MouseEvent-dispatching logic into MouseEventDispatchMediator.
2203 https://bugs.webkit.org/show_bug.cgi?id=57639
2205 Refactoring, covered by existing tests.
2207 * dom/EventDispatcher.cpp:
2208 (WebCore::EventDispatcher::dispatchEvent): Moved useful assertion here
2209 from dispatchMouseEvent.
2210 (WebCore::EventDispatcher::adjustRelatedTarget): Converted into a method.
2211 * dom/EventDispatcher.h: Adjusted decls.
2212 (WebCore::EventDispatcher::node): Added.
2213 * dom/MouseEvent.cpp:
2214 (WebCore::MouseEvent::create): Moved useful assertion here from
2216 (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator): Added.
2217 (WebCore::MouseEventDispatchMediator::event): Added.
2218 (WebCore::MouseEventDispatchMediator::dispatchEvent): Added.
2220 (WebCore::MouseEvent::setRelatedTarget): Added.
2222 (WebCore::Node::dispatchMouseEvent): Changed to use MouseEventDispatchMediator.
2224 2011-04-05 Nikolas Zimmermann <nzimmermann@rim.com>
2226 Reviewed by Adam Roben & Dirk Schulze.
2228 text-tspan-02-b.svg from SVG 1.1 2nd edition fails
2229 https://bugs.webkit.org/show_bug.cgi?id=57831
2231 We were not spanning rotation values correcty accross text children, which resulted in text-span-02-b.svg misrendering.
2232 While rewriting the rotation specific code, it came apparent that the LayoutScope concept is flawed in general and
2233 should be replaced by a global list of x/y/dx/dy/rotate values for the whole text subtree. This makes it much simpler
2234 to implement the demand that the last rotation value spans the whole scope. A follow-up patch will optimize the
2238 <text rotate="10,20,999,50">AB<tspan rotate="30">CDE</>FGH</text>
2240 text: A B C D E F G H
2241 rotate="10 20 30 30 30 50 50 50"
2243 Tests: svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg
2244 svg/text/text-midpoint-split-bug.svg
2246 * rendering/RenderBlockLineLayout.cpp: Move SVG specific midpoint creation after the non-SVG specific code that may mutate the midpoints. otherwhise we end up in an
2247 (WebCore::RenderBlock::findNextLineBreak): inconsistent state. We were intereferring with the ignoreSpaces code resulting in wrong truncations - covered by new testcase.
2248 * rendering/svg/SVGTextLayoutAttributes.cpp:
2249 (WebCore::SVGTextLayoutAttributes::reserveCapacity): Also reserveCapacity for the text metrics list (minor optimization).
2250 (WebCore::SVGTextLayoutAttributes::fillWithEmptyValue): Added helper function for use from SVGTextLayoutAttributesBuilder.
2251 (WebCore::SVGTextLayoutAttributes::appendEmptyValue): Ditto.
2252 (WebCore::safeValueAtPosition): Ditto. (Inline helper)
2253 (WebCore::SVGTextLayoutAttributes::appendSingleValueFromAttribute): Ditto.
2254 * rendering/svg/SVGTextLayoutAttributes.h: Ditto.
2255 * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Rewrite code, see explaination above.
2256 (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree):
2257 (WebCore::processRenderSVGInlineText):
2258 (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
2259 (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForAllCharacters):
2260 (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
2261 (WebCore::fillListAtPosition):
2262 (WebCore::SVGTextLayoutAttributesBuilder::fillAttributesAtPosition):
2263 * rendering/svg/SVGTextLayoutAttributesBuilder.h:
2264 (WebCore::SVGTextLayoutAttributesBuilder::TextPosition::TextPosition):
2266 2011-04-05 Levi Weintraub <leviw@chromium.org>
2268 Reviewed by Ryosuke Niwa.
2270 DeleteButtonController is given invalid style
2271 https://bugs.webkit.org/show_bug.cgi?id=57853
2273 DeleteButtonController was assigned an invalid style that can lead to assertions
2274 in debug builds. This matches up the code with its intent.
2276 No new tests as this changes nothing on release builds.
2278 * editing/DeleteButtonController.cpp:
2279 (WebCore::DeleteButtonController::createDeletionUI):
2281 2011-04-05 Anders Bakken <agbakken@gmail.com>
2283 Reviewed by Laszlo Gombos.
2285 [Qt] EditorQt.cpp has coding-style errors
2286 https://bugs.webkit.org/show_bug.cgi?id=40260
2288 This patch does not require new test cases.
2290 * editing/qt/EditorQt.cpp:
2292 2011-04-05 Pavel Podivilov <podivilov@chromium.org>
2294 Reviewed by Pavel Feldman.
2296 Web Inspector: go to line dialog highlights wrong line.
2297 https://bugs.webkit.org/show_bug.cgi?id=57845
2299 * inspector/front-end/GoToLineDialog.js:
2300 (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
2302 2011-04-05 Luke Macpherson <macpherson@chromium.org>
2304 Reviewed by Dimitri Glazkov.
2306 Implement CSSPropertyDirection in CSSStyleApplyProperty
2307 https://bugs.webkit.org/show_bug.cgi?id=57608
2309 No new tests required as no new functionality introduced.
2311 * css/CSSStyleApplyProperty.cpp:
2312 Add implementation class for CSSPropertyDirection
2313 * css/CSSStyleSelector.cpp:
2314 Remove existing implementation for CSSPropertyDirection
2315 * css/CSSStyleSelector.h:
2316 Add getter for element
2318 2011-04-05 Leandro Gracia Gil <leandrogracia@chromium.org>
2320 Reviewed by Steve Block.
2322 Factoring the creation of 'FunctionOnly' callbacks in V8.
2323 https://bugs.webkit.org/show_bug.cgi?id=57760
2325 This method creates a template from an existing functionality in V8GeolocationCustom.cpp
2326 to V8Utilities to be used by the custom bindings of both Geolocation and the Media Stream API.
2328 No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2330 * bindings/v8/V8Utilities.cpp:
2331 (WebCore::throwTypeMismatchException):
2332 * bindings/v8/V8Utilities.h:
2333 (WebCore::createFunctionOnlyCallback):
2334 * bindings/v8/custom/V8GeolocationCustom.cpp:
2335 (WebCore::V8Geolocation::getCurrentPositionCallback):
2336 (WebCore::V8Geolocation::watchPositionCallback):
2338 2011-04-05 Nikolas Zimmermann <nzimmermann@rim.com>
2340 Reviewed by Andreas Kling.
2342 Switch from Vector<UChar> to StringBuilder in bindings/
2343 https://bugs.webkit.org/show_bug.cgi?id=57838
2345 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2346 (WebCore::cssPropertyName):
2347 * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2348 (WebCore::cssPropertyInfo):
2350 2011-04-05 Nikolas Zimmermann <nzimmermann@rim.com>
2352 Reviewed by Andreas Kling.
2354 Switch from Vector<UChar> to StringBuilder in accessibility/
2355 https://bugs.webkit.org/show_bug.cgi?id=57837
2357 * accessibility/AccessibilityObject.cpp:
2358 (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
2359 (WebCore::AccessibilityObject::stringForVisiblePositionRange):
2360 * accessibility/AccessibilityRenderObject.cpp:
2361 (WebCore::AccessibilityRenderObject::accessibilityDescriptionForElements):
2363 2011-04-05 Andrey Adaikin <aandrey@google.com>
2365 Reviewed by Pavel Feldman.
2367 Web Inspector: Scripts with syntax errors are cropped in the UI
2368 https://bugs.webkit.org/show_bug.cgi?id=57828
2370 * inspector/front-end/SourceFrame.js:
2371 (WebInspector.SourceFrame.prototype.addMessageToSource):
2373 2011-04-05 Alexey Proskuryakov <ap@apple.com>
2375 Reviewed by Darin Adler.
2377 Remove onformchange and onforminput events/event handlers
2378 https://bugs.webkit.org/show_bug.cgi?id=55755
2379 <rdar://problem/9087969>
2381 Covered by existing tests.
2388 (WebCore::Event::fromUserGesture):
2390 * html/FormAssociatedElement.h:
2391 * html/HTMLAttributeNames.in:
2392 * html/HTMLElement.cpp:
2393 (WebCore::HTMLElement::parseMappedAttribute):
2394 * html/HTMLElement.h:
2395 * html/HTMLFormControlElement.h:
2396 (WebCore::HTMLFormControlElement::isEnumeratable):
2397 * html/HTMLFormElement.cpp:
2398 * html/HTMLFormElement.h:
2399 * html/HTMLFormElement.idl:
2400 * html/HTMLInputElement.h:
2401 * html/HTMLKeygenElement.h:
2402 * html/HTMLObjectElement.h:
2403 (WebCore::HTMLObjectElement::isEnumeratable):
2404 * html/HTMLOutputElement.h:
2405 (WebCore::HTMLOutputElement::isEnumeratable):
2406 * html/HTMLSelectElement.h:
2407 (WebCore::HTMLSelectElement::isEnumeratable):
2408 * html/HTMLTextAreaElement.h:
2409 (WebCore::HTMLTextAreaElement::isEnumeratable):
2411 * page/DOMWindow.idl:
2413 2011-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
2415 Unreviewed, rolling out r82915.
2416 http://trac.webkit.org/changeset/82915
2417 https://bugs.webkit.org/show_bug.cgi?id=57825
2419 Broke 270 chromium tests on win and linux (Requested by
2420 podivilov on #webkit).
2422 * rendering/RenderThemeChromiumSkia.cpp:
2423 (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
2425 2011-04-05 James Simonsen <simonjam@chromium.org>
2427 Reviewed by Adam Barth.
2429 Stop preload scanning CSS when it's impossible to have another @import.
2430 https://bugs.webkit.org/show_bug.cgi?id=57664
2432 @import statements are only allowed at the beginning of a CSS file.
2433 Only comments or @charset can precede them. After seeing anything else,
2434 abort early so that we:
2435 - don't have to parse the rest of the CSS.
2436 - don't preload something that the regular parser won't load.
2438 * html/parser/CSSPreloadScanner.cpp:
2439 (WebCore::CSSPreloadScanner::scan): Terminate early if we're done with @imports.
2440 (WebCore::CSSPreloadScanner::tokenize): Terminate early if we see a {} or any style rule.
2441 (WebCore::CSSPreloadScanner::emitRule): Only @charset or @import are allowed to precede @import.
2442 * html/parser/CSSPreloadScanner.h: Add DoneParsingImportRules state.
2444 2011-04-05 Takayoshi Kochi <kochi@chromium.org>
2446 Reviewed by Tony Chang.
2448 [chromium] Specify 'sans-serif' as a fallback to the default UI font
2449 'Arial' for non-latin UI scripts (e.g. CJK).
2450 https://bugs.webkit.org/show_bug.cgi?id=55035
2452 No new tests, because it may still fail if the system is not configured
2453 properly to resolve 'sans-serif' to existing real font file, thus even
2454 manual test is hard to systematically tell it is working properly.
2456 * rendering/RenderThemeChromiumSkia.cpp
2458 2011-04-05 Kent Tamura <tkent@chromium.org>
2460 Reviewed by Dimitri Glazkov.
2462 Setting defaultValue on a textarea with a modified value still clobbers the value
2463 https://bugs.webkit.org/show_bug.cgi?id=57636
2465 If the dirty flag is true, we shouldn't update the value when the
2466 defaultValue is updated
2468 Test: fast/forms/textarea-set-defaultvalue-after-value.html
2470 * html/HTMLTextAreaElement.cpp:
2471 (WebCore::HTMLTextAreaElement::childrenChanged):
2472 (WebCore::HTMLTextAreaElement::setDefaultValue):
2474 2011-04-04 Kent Tamura <tkent@chromium.org>
2476 Add a case label which was unexpectedly removed in r82899.
2477 https://bugs.webkit.org/show_bug.cgi?id=50661
2479 * css/CSSSelector.cpp:
2480 (WebCore::CSSSelector::extractPseudoType):
2482 2011-04-04 Dan Bernstein <mitz@apple.com>
2484 Reviewed by Simon Fraser.
2486 <rdar://problem/7709452> Implement Default Ruby Overhang Behavior
2487 https://bugs.webkit.org/show_bug.cgi?id=49334
2489 Tests: fast/ruby/overhang-horizontal.html
2490 fast/ruby/overhang-vertical.html
2492 This is a first cut at ruby overhang. It allows ruby text to hang over other
2493 text of equal or smaller size. Two notable omissions are that max preferred
2494 width computation was not patched, so it will overshoot, and that overhang
2495 ignores the width of the adjoining text runs.
2497 * rendering/RenderBlock.h:
2498 * rendering/RenderBlockLineLayout.cpp:
2499 (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Adjust margins
2500 of ruby runs for overhang.
2501 (WebCore::RenderBlock::fitBelowFloats): Maintain the increase in line width to
2502 compensate for overhang.
2503 (WebCore::RenderBlock::findNextLineBreak): When encountering
2504 a ruby run, increase the line width to account for the fact that overhang will be
2506 * rendering/RenderRubyRun.cpp:
2507 (WebCore::RenderRubyRun::getOverhang): Added. Allows ruby to overhang if
2508 the adjoining renderer is text with equal or smaller font size.
2509 * rendering/RenderRubyRun.h:
2510 (WebCore::toRenderRubyRun):
2512 2011-04-04 David Kilzer <ddkilzer@apple.com>
2514 <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
2516 Reviewed by Alexey Proskuryakov.
2518 * WebCore.exp.in: Export wkSetHTTPPipeliningMaximumPriority().
2519 * platform/mac/WebCoreSystemInterface.h:
2520 (wkSetHTTPPipeliningMaximumPriority): Added function pointer
2522 * platform/mac/WebCoreSystemInterface.mm:
2523 (wkSetHTTPPipeliningMaximumPriority): Added function pointer.
2524 * platform/network/cf/ResourceRequestCFNet.cpp:
2525 (WebCore::initializeMaximumHTTPConnectionCountPerHost): Call
2526 wkSetHTTPPipeliningMaximumPriority() to set the maximum HTTP
2527 pipelining priority.
2528 * platform/network/cf/ResourceRequestCFNet.h:
2529 (WebCore::toResourceLoadPriority): Renamed from
2530 mapHTTPPipeliningPriorityToResourceLoadPriority(). Updated to
2531 to handle Unresolved case.
2532 (WebCore::toHTTPPipeliningPriority): Renamed from
2533 mapResourceLoadPriorityToHTTPPipeliningPriority(). Updated to
2534 handle Unresolved case.
2535 * platform/network/mac/ResourceRequestMac.mm:
2536 (WebCore::ResourceRequest::doUpdateResourceRequest): Switched to
2537 use toResourceLoadPriority().
2538 (WebCore::ResourceRequest::doUpdatePlatformRequest): Switched to
2539 use toHTTPPipeliningPriority(). Moved
2540 shouldForceHTTPPipeliningPriorityHigh() check into the argument
2541 of toHTTPPipeliningPriority() instead of hard-coding a
2542 now-incorrect value.
2544 2011-04-04 MORITA Hajime <morrita@google.com>
2546 Reviewed by Kent Tamura.
2548 Convert <meter> shadow DOM to a DOM-based shadow.
2549 https://bugs.webkit.org/show_bug.cgi?id=50661
2551 Eliminated a large part of <meter> custom layout code,
2552 which is replaced by a shadow tree.
2553 Note that the shadow tree is created on construction time and
2554 will remain during the host HTMLMeterElement lifecycle.
2561 * WebCore.vcproj/WebCore.vcproj:
2562 * WebCore.xcodeproj/project.pbxproj:
2563 * css/CSSMutableStyleDeclaration.cpp:
2564 (WebCore::CSSMutableStyleDeclaration::setProperty):
2565 * css/CSSMutableStyleDeclaration.h:
2566 * css/CSSSelector.cpp:
2567 (WebCore::CSSSelector::pseudoId):
2568 (WebCore::nameToPseudoTypeMap):
2569 (WebCore::CSSSelector::extractPseudoType):
2570 * css/CSSSelector.h:
2573 (meter::-webkit-meter-bar):
2574 (meter::-webkit-meter-optimum-value):
2575 (meter::-webkit-meter-suboptimum-value):
2576 (meter::-webkit-meter-even-less-good-value):
2577 * html/HTMLMeterElement.cpp:
2578 (WebCore::HTMLMeterElement::~HTMLMeterElement):
2579 (WebCore::HTMLMeterElement::parseMappedAttribute):
2580 (WebCore::HTMLMeterElement::attach):
2581 (WebCore::HTMLMeterElement::valueRatio):
2582 (WebCore::HTMLMeterElement::didElementStateChange):
2583 (WebCore::HTMLMeterElement::createShadowSubtree):
2584 * html/HTMLMeterElement.h:
2585 * html/shadow/MeterShadowElement.cpp: Added.
2586 (WebCore::MeterShadowElement::MeterShadowElement):
2587 (WebCore::MeterShadowElement::meterElement):
2588 (WebCore::MeterShadowElement::rendererIsNeeded):
2589 (WebCore::MeterBarElement::shadowPseudoId):
2590 (WebCore::MeterValueElement::shadowPseudoId):
2591 (WebCore::MeterValueElement::setWidthPercentage):
2592 * html/shadow/MeterShadowElement.h: Added.
2593 (WebCore::MeterBarElement::MeterBarElement):
2594 (WebCore::MeterBarElement::create):
2595 (WebCore::MeterValueElement::MeterValueElement):
2596 (WebCore::MeterValueElement::create):
2597 * rendering/RenderMeter.cpp:
2598 (WebCore::RenderMeter::RenderMeter):
2599 (WebCore::RenderMeter::~RenderMeter):
2600 (WebCore::RenderMeter::valueRatio):
2601 * rendering/RenderMeter.h:
2602 (WebCore::RenderMeter::renderName):
2603 (WebCore::RenderMeter::isMeter):
2604 (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2605 (WebCore::RenderMeter::canHaveChildren):
2607 2011-04-04 Dimitri Glazkov <dglazkov@chromium.org>
2609 Reviewed by Adam Barth.
2611 Introduce EventDispatchMediator abstraction, which encapsulate all
2612 non-trivial logic around firing a specific type of an event.
2613 https://bugs.webkit.org/show_bug.cgi?id=57562
2615 Refactoring, covered by existing tests.
2618 (WebCore::EventDispatchMediator::EventDispatchMediator): Added.
2619 (WebCore::EventDispatchMediator::~EventDispatchMediator): Added.
2620 (WebCore::EventDispatchMediator::dispatchEvent): Added.
2621 (WebCore::EventDispatchMediator::event): Added.
2622 * dom/Event.h: Added decl.
2623 * dom/EventDispatcher.cpp:
2624 (WebCore::EventDispatcher::dispatchEvent): Changed to use EventDispatchMediator.
2625 * dom/EventDispatcher.h: Updated decls.
2626 * dom/KeyboardEvent.cpp:
2627 (WebCore::KeyboardEventDispatchMediator::KeyboardEventDispatchMediator): Added.
2628 (WebCore::KeyboardEventDispatchMediator::dispatchEvent): Added.
2629 * dom/KeyboardEvent.h: Updated decls
2631 (WebCore::Node::dispatchEvent): Changed to use EventDispatchMediator.
2632 (WebCore::Node::dispatchKeyEvent): Changed to use KeyboardEventDispatchMediator.
2634 2011-04-04 Martin Robinson <mrobinson@igalia.com>
2636 Reviewed by Xan Lopez.
2638 [Cairo] Memory leak in RefPtrCairo
2639 https://bugs.webkit.org/show_bug.cgi?id=57758
2641 No new tests. This just fixes a memory leak.
2643 * platform/graphics/cairo/RefPtrCairo.cpp:
2644 (WTF::derefIfNotNull): Deref should unref the cairo_font_fact_t, not reference it.
2646 2011-04-04 Adrienne Walker <enne@google.com>
2648 Unreviewed, rolling out r82880.
2649 http://trac.webkit.org/changeset/82880
2650 https://bugs.webkit.org/show_bug.cgi?id=50661
2652 Meter elements not rendered in Chromium Linux layout tests
2659 * WebCore.vcproj/WebCore.vcproj:
2660 * WebCore.xcodeproj/project.pbxproj:
2661 * css/CSSMutableStyleDeclaration.cpp:
2662 * css/CSSMutableStyleDeclaration.h:
2663 * css/CSSSelector.cpp:
2664 (WebCore::CSSSelector::pseudoId):
2665 (WebCore::nameToPseudoTypeMap):
2666 (WebCore::CSSSelector::extractPseudoType):
2667 * css/CSSSelector.h:
2670 (meter::-webkit-meter):
2671 (meter::-webkit-meter-bar):
2672 (meter::-webkit-meter-optimum-value):
2673 (meter::-webkit-meter-suboptimal-value):
2674 (meter::-webkit-meter-even-less-good-value):
2675 * html/HTMLMeterElement.cpp:
2676 (WebCore::HTMLMeterElement::create):
2677 (WebCore::HTMLMeterElement::parseMappedAttribute):
2678 (WebCore::HTMLMeterElement::attach):
2679 * html/HTMLMeterElement.h:
2680 * html/shadow/MeterShadowElement.cpp: Removed.
2681 * html/shadow/MeterShadowElement.h: Removed.
2682 * rendering/RenderMeter.cpp:
2683 (WebCore::RenderMeter::RenderMeter):
2684 (WebCore::RenderMeter::~RenderMeter):
2685 (WebCore::RenderMeter::createPart):
2686 (WebCore::RenderMeter::updateFromElement):
2687 (WebCore::RenderMeter::layoutParts):
2688 (WebCore::RenderMeter::styleDidChange):
2689 (WebCore::RenderMeter::shouldHaveParts):
2690 (WebCore::RenderMeter::valueRatio):
2691 (WebCore::RenderMeter::barPartRect):
2692 (WebCore::RenderMeter::valuePartRect):
2693 (WebCore::RenderMeter::valuePseudoId):
2694 (WebCore::RenderMeter::barPseudoId):
2695 (WebCore::RenderMeter::detachShadows):
2696 (WebCore::RenderMeter::updateShadows):
2697 * rendering/RenderMeter.h:
2698 (WebCore::RenderMeter::renderName):
2699 (WebCore::RenderMeter::isMeter):
2700 (WebCore::RenderMeter::shadowAttached):
2702 2011-04-04 Chang Shu <cshu@webkit.org>
2704 Reviewed by Ryosuke Niwa.
2706 setContentEditable with true/false/inherit string is not working properly
2707 https://bugs.webkit.org/show_bug.cgi?id=52058
2709 Move isContentEditable from HTMLElement to Node. Thus, Node provides two functions for
2710 checking editability: rendererIsEditable and isContentEdiable. The former is a fast path,
2711 which does NOT trigger layout and only checks the render style of usermodify. The latter
2712 updates the layout first to make sure the render style syncs with DOM contenteditable
2713 attribute. Certain call sites that need to call isContentEditable rather than rendererIsEditable
2714 are also updated in the patch. But a complete fix will follow up in bug 57244.
2716 This patch fixes all the failed layout tests related to set contenteditable.
2718 * accessibility/AccessibilityRenderObject.cpp:
2719 (WebCore::AccessibilityRenderObject::isReadOnly):
2721 (WebCore::Node::isContentEditable):
2722 (WebCore::Node::shouldUseInputMethod):
2724 * html/HTMLElement.cpp:
2725 * html/HTMLElement.h:
2727 2011-04-04 Roland Steiner <rolandsteiner@chromium.org>
2729 Reviewed by Dimitri Glazkov.
2731 Bug 57689 - Extract scoping functionality from Document
2732 https://bugs.webkit.org/show_bug.cgi?id=57689
2734 Moved selfOnlyRef (renamed to guardRef), element ID, image map
2735 and accesss key functionalities from Document to a new base
2738 TreeShared: made removedLastRef protected
2740 No new tests. (refactoring)
2747 * WebCore.vcproj/WebCore.vcproj:
2748 * WebCore.xcodeproj/project.pbxproj:
2750 (WebCore::Document::Document):
2751 (WebCore::Document::destroyScope):
2752 (WebCore::Document::getElementById):
2753 (WebCore::Document::childrenChanged):
2754 (WebCore::Document::scheduleStyleRecalc):
2755 (WebCore::Document::attach):
2756 (WebCore::Document::detach):
2758 (WebCore::Node::Node):
2759 * dom/DocumentOrderedMap.cpp:
2760 (WebCore::DocumentOrderedMap::get):
2761 (WebCore::DocumentOrderedMap::getElementById):
2762 (WebCore::DocumentOrderedMap::getElementByMapName):
2763 (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
2764 * dom/DocumentOrderedMap.h:
2765 * dom/DOMAllInOne.cpp:
2767 (WebCore::Node::~Node):
2768 (WebCore::Node::setDocument):
2770 * dom/TreeScope.cpp: Added.
2771 * dom/TreeScope.h: Added.
2772 * platform/TreeShared.h:
2773 (WebCore::TreeShared::removedLastRef): made protected
2775 2011-04-04 MORITA Hajime <morrita@google.com>
2777 Reviewed by Dimitri Glazkov.
2779 Convert <meter> shadow DOM to a DOM-based shadow.
2780 https://bugs.webkit.org/show_bug.cgi?id=50661
2782 Eliminated a large part of <meter> custom layout code,
2783 which is replaced by a shadow tree.
2784 Note that the shadow tree is created on construction time and
2785 will remain during the host HTMLMeterElement lifecycle.
2792 * WebCore.vcproj/WebCore.vcproj:
2793 * WebCore.xcodeproj/project.pbxproj:
2794 * css/CSSMutableStyleDeclaration.cpp:
2795 (WebCore::CSSMutableStyleDeclaration::setProperty):
2796 * css/CSSMutableStyleDeclaration.h:
2797 * css/CSSSelector.cpp:
2798 (WebCore::CSSSelector::pseudoId):
2799 (WebCore::nameToPseudoTypeMap):
2800 (WebCore::CSSSelector::extractPseudoType):
2801 * css/CSSSelector.h:
2804 (meter::-webkit-meter-bar):
2805 (meter::-webkit-meter-optimum-value):
2806 (meter::-webkit-meter-suboptimum-value):
2807 (meter::-webkit-meter-even-less-good-value):
2808 * html/HTMLMeterElement.cpp:
2809 (WebCore::HTMLMeterElement::~HTMLMeterElement):
2810 (WebCore::HTMLMeterElement::parseMappedAttribute):
2811 (WebCore::HTMLMeterElement::attach):
2812 (WebCore::HTMLMeterElement::valueRatio):
2813 (WebCore::HTMLMeterElement::didElementStateChange):
2814 (WebCore::HTMLMeterElement::createShadowSubtree):
2815 * html/HTMLMeterElement.h:
2816 * html/shadow/MeterShadowElement.cpp: Added.
2817 (WebCore::MeterShadowElement::MeterShadowElement):
2818 (WebCore::MeterShadowElement::meterElement):
2819 (WebCore::MeterShadowElement::rendererIsNeeded):
2820 (WebCore::MeterBarElement::shadowPseudoId):
2821 (WebCore::MeterValueElement::shadowPseudoId):
2822 (WebCore::MeterValueElement::setWidthPercentage):
2823 * html/shadow/MeterShadowElement.h: Added.
2824 (WebCore::MeterBarElement::MeterBarElement):
2825 (WebCore::MeterBarElement::create):
2826 (WebCore::MeterValueElement::MeterValueElement):
2827 (WebCore::MeterValueElement::create):
2828 * rendering/RenderMeter.cpp:
2829 (WebCore::RenderMeter::RenderMeter):
2830 (WebCore::RenderMeter::~RenderMeter):
2831 (WebCore::RenderMeter::valueRatio):
2832 * rendering/RenderMeter.h:
2833 (WebCore::RenderMeter::renderName):
2834 (WebCore::RenderMeter::isMeter):
2835 (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
2836 (WebCore::RenderMeter::canHaveChildren):
2838 2011-04-04 Martin Robinson <mrobinson@igalia.com>
2840 Reviewed by Gustavo Noronha Silva.
2843 https://bugs.webkit.org/show_bug.cgi?id=31517
2845 Add WebGL support for the GTK+ bits of WebCore.
2847 No new tests. This will be covered by the existing WebGL tests once
2848 the bots are capable of running WebGL tests.
2850 * GNUmakefile.am: Added new files required for WebGL support.
2851 * html/HTMLCanvasElement.cpp:
2852 (WebCore::HTMLCanvasElement::getContext): Extend #ifdef to cover GTK+ as well, which does not
2853 yet support accelerated compositing.
2854 * platform/graphics/ANGLEWebKitBridge.h: Update to reflect the fact that ANGLE isn't compiled as
2855 a framework for GTK+.
2856 * platform/graphics/GraphicsContext3D.h:
2857 (WebCore::GraphicsContext3D::platformTexture): Added a declaration of this method for Cairo.
2858 (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): Ditto.
2859 * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Added.
2860 (WebCore::GraphicsContext3D::getImageData): Added.
2861 (WebCore::GraphicsContext3D::paintToCanvas): Added.
2862 * platform/graphics/cairo/OpenGLShims.cpp: Added. This file controls loading of GL extension
2863 functions dynamically. They have different names across the different vendors' GL implementations.
2864 (WebCore::lookupOpenGLFunctionAddress): Added
2865 (WebCore::openGLFunctionTable): Added
2866 (WebCore::initializeOpenGLShims): Added
2867 * platform/graphics/cairo/OpenGLShims.h: Added.
2868 * platform/graphics/gtk/DrawingBufferGtk.cpp: Added.
2869 (WebCore::DrawingBuffer::DrawingBuffer): Very generic implementation for Cairo.
2870 (WebCore::DrawingBuffer::~DrawingBuffer): Ditto.
2871 (WebCore::DrawingBuffer::didReset): Ditto.
2872 (WebCore::DrawingBuffer::platformColorBuffer): Ditto.
2873 * platform/graphics/gtk/GraphicsContext3DGtk.cpp: Added.
2874 (WebCore::GraphicsContext3D::create): Initial implementation.
2875 (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
2876 (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
2877 (WebCore::GraphicsContext3D::makeContextCurrent): Ditto.
2878 (WebCore::GraphicsContext3D::platformGraphicsContext3D): Ditto.
2879 (WebCore::GraphicsContext3D::isGLES2Compliant): Ditto.
2880 * platform/graphics/gtk/GraphicsContext3DInternal.cpp: Added.
2881 (sharedDisplay): Added this shared display which is required by some
2883 (WebCore::activeGraphicsContexts): This method keeps track of all active GraphicsContext3D
2884 contexts, in order to clean them up at exit. This prevents crashes on certain OpenGL drivers.
2885 (WebCore::GraphicsContext3DInternal::addActiveGraphicsContext): Ditto.
2886 (WebCore::GraphicsContext3DInternal::removeActiveGraphicsContext): Ditto.
2887 (WebCore::GraphicsContext3DInternal::cleanupActiveContextsAtExit): Ditto.
2888 (WebCore::GraphicsContext3DInternal::create): Figure out the best way to create an OpenGL
2889 context given the current environment.
2890 (WebCore::GraphicsContext3DInternal::createPbufferContext): Pbuffer context initializer.
2891 (WebCore::GraphicsContext3DInternal::createPixmapContext): Pixmap context initializer.
2892 (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): Initial implementation.
2893 (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): Ditto.
2894 (WebCore::GraphicsContext3DInternal::makeContextCurrent): Ditto.
2895 * platform/graphics/gtk/GraphicsContext3DInternal.h: Added.
2896 * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added generic implementation.
2897 (WebCore::Extensions3DOpenGL::ensureEnabled): Ditto.
2898 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2899 (WebCore::GraphicsContext3D::reshape): Test for the context using the public API rather than
2900 the private bits that are specific to the Apple port.
2902 2011-04-04 Alexey Proskuryakov <ap@apple.com>
2904 Reviewed by Dan Bernstein.
2906 REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
2907 https://bugs.webkit.org/show_bug.cgi?id=51230
2908 <rdar://problem/8780989>
2910 <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
2912 * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Moved Caps Lock handling from
2913 WebKits to WebCore, because WebKit shouldn't be smart.
2915 2011-04-04 Steve Falkenburg <sfalken@apple.com>
2917 Fix Windows build warning.
2919 * WebCore.vcproj/WebCore.vcproj: Exclude EventQueue.cpp in Debug_All build.
2921 2011-04-04 Adam Roben <aroben@apple.com>
2923 Attempted Mac build fix, part III
2925 * WebCore.exp.in: Export PlatformCALayer::setGeometryFlipped. Also resorted some symbols.
2927 2011-04-04 Andy Estes <aestes@apple.com>
2933 2011-04-04 David Dorwin <ddorwin@chromium.org>
2935 Reviewed by David Levin.
2937 Chromium Mac crashes when entering fullscreen
2938 https://bugs.webkit.org/show_bug.cgi?id=57483
2940 Override extraFullScreenStyleSheet in RenderThemeChromiumMac to avoid hitting the ASSERT_NOT_REACHED in RenderThemeMac.
2942 * WebCore.gyp/WebCore.gyp:
2943 * rendering/RenderThemeChromiumMac.h:
2944 * rendering/RenderThemeChromiumMac.mm:
2945 (WebCore::RenderThemeChromiumMac::extraFullScreenStyleSheet):
2947 2011-04-04 Adam Roben <aroben@apple.com>
2949 Attempted Mac build fix, part II
2951 * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayerClient.h and
2952 PlatformCAAnimation.h as private so that WebKit2 can #include them (transitively).
2954 2011-04-04 Steve Falkenburg <sfalken@apple.com>
2956 Reviewed by Adam Roben.
2958 Remove unused AnalyzeWithLargeStack code from Windows build files
2959 https://bugs.webkit.org/show_bug.cgi?id=57771
2961 This was used for us to build with prefast automatically,
2962 but it is out-of-date and hasn't been used for some time.
2963 Removing completely for now.
2965 * WebCore.vcproj/WebCore.vcproj:
2966 * WebCore.vcproj/WebCorePreBuild.cmd:
2968 2011-04-01 Matthew Delaney <mdelaney@apple.com>
2970 Reviewed by Simon Fraser.
2972 [CG] Do not accelerate small canvases
2973 https://bugs.webkit.org/show_bug.cgi?id=57596
2975 No new tests. No outward behavior changes.
2977 * platform/graphics/cg/ImageBufferCG.cpp:
2979 2011-04-04 Adam Roben <aroben@apple.com>
2981 Attempted Mac build fix
2983 * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayer.h and GraphicsLayerCA.h private
2984 so that WebKit can #include them.
2986 2011-04-04 Malcolm MacLeod <mmacleod@webmail.co.za>
2988 Reviewed by Kevin Ollivier.
2990 [wx] Implement support for temporary files.
2992 https://bugs.webkit.org/show_bug.cgi?id=57772
2994 * platform/FileSystem.h:
2995 * platform/wx/FileSystemWx.cpp:
2996 (WebCore::getFileModificationTime):
2997 (WebCore::openTemporaryFile):
2998 (WebCore::closeFile):
2999 (WebCore::writeToFile):
3001 2011-04-01 Oliver Hunt <oliver@apple.com>
3003 Reviewed by Geoffrey Garen.
3005 Make StructureChain GC allocated
3006 https://bugs.webkit.org/show_bug.cgi?id=56695
3008 Update for new Structure marking function
3010 * bindings/js/JSDOMGlobalObject.cpp:
3011 (WebCore::JSDOMGlobalObject::markChildren):
3013 2011-04-04 Pavel Feldman <pfeldman@google.com>
3015 Reviewed by Yury Semikhatsky.
3017 Web Inspector: add support for the enumerated types in the protocol.
3018 https://bugs.webkit.org/show_bug.cgi?id=57761
3020 * inspector/Inspector.json:
3021 * inspector/InspectorDebuggerAgent.cpp:
3022 (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
3023 * inspector/InspectorDebuggerAgent.h:
3024 * inspector/InspectorInstrumentation.cpp:
3025 (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
3026 (WebCore::InspectorInstrumentation::scriptImportedImpl):
3027 * inspector/InspectorResourceAgent.cpp:
3028 (WebCore::cachedResourceTypeString):
3029 (WebCore::InspectorResourceAgent::didReceiveResponse):
3030 (WebCore::InspectorResourceAgent::setInitialScriptContent):
3031 (WebCore::InspectorResourceAgent::setInitialXHRContent):
3032 * inspector/InspectorResourceAgent.h:
3033 * inspector/front-end/ScriptsPanel.js:
3034 * inspector/generate-inspector-idl:
3036 2011-04-04 Yury Semikhatsky <yurys@chromium.org>
3038 Reviewed by Pavel Feldman.
3040 Web Inspector: InspectorRuntimeAgent should not depend on Page
3041 https://bugs.webkit.org/show_bug.cgi?id=57759
3043 Descendants of InspectorRuntimeAgent should implement a method providing access to the default
3044 inspected state used for console evaluations.
3046 * inspector/InspectorAgent.cpp:
3047 (WebCore::InspectorAgent::InspectorAgent): runtime agent is created and deleted along with other agents.
3048 (WebCore::InspectorAgent::setFrontend):
3049 * inspector/InspectorAgent.h:
3050 * inspector/InspectorRuntimeAgent.cpp:
3051 (WebCore::InspectorRuntimeAgent::create):
3052 (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3053 (WebCore::InspectorRuntimeAgent::evaluate):
3054 * inspector/InspectorRuntimeAgent.h:
3055 (WebCore::InspectorRuntimeAgent::InspectedStateProvider::~InspectedStateProvider):
3057 2011-04-04 Yong Li <yoli@rim.com>
3059 Reviewed by Antonio Gomes.
3061 https://bugs.webkit.org/show_bug.cgi?id=55969
3062 Fix the issue that document state is not saved when
3063 going backward and ending up with error page.
3065 Test: platform/qt/fast/history/back-to-unreachable-url-then-forward.html
3067 (For manual test, load a non-existent html first, then load
3068 fast/history/resources/check-scroll-position.html, then go
3069 back and go forward. If it doesn't show "SUCCESS" at the bottom
3070 of the page, your browser has failed the test)
3072 * loader/FrameLoader.cpp:
3073 (WebCore::FrameLoader::load):
3075 2011-04-04 Sergio Villar Senin <svillar@igalia.com>
3077 Reviewed by Martin Robinson.
3079 [GTK] Fix make distcheck for 1.4.0
3080 https://bugs.webkit.org/show_bug.cgi?id=57750
3082 Added a missing header file to the Makefile
3086 2011-04-04 Martin Robinson <mrobinson@igalia.com>
3088 Reviewed by Xan Lopez.
3090 [GTK] http/tests/plugins/post-url-file.html fails on GTK+
3091 https://bugs.webkit.org/show_bug.cgi?id=55826
3093 Correct the implementation of handlePostReadFile which uses GIO APIs and
3094 actually resizes the buffer to fit the entire size of the file data. This
3095 was likely leading to memory corruption until now.
3097 * plugins/gtk/PluginViewGtk.cpp:
3098 (WebCore::PluginView::handlePostReadFile): Fix this method.
3100 2011-04-04 Andrey Kosyakov <caseq@chromium.org>
3102 Reviewed by Yury Semikhatsky.
3104 Web Inspector: [Extensions API] add notifications on panels shown/hidden
3105 https://bugs.webkit.org/show_bug.cgi?id=57752
3107 * inspector/front-end/ExtensionAPI.js:
3108 (WebInspector.injectedExtensionAPI.PanelImpl):
3109 * inspector/front-end/ExtensionServer.js:
3110 (WebInspector.ExtensionServer.prototype.notifyPanelShown):
3111 (WebInspector.ExtensionServer.prototype.notifyPanelHidden):
3112 * inspector/front-end/Panel.js:
3113 (WebInspector.Panel.prototype.show):
3114 (WebInspector.Panel.prototype.hide):
3116 2011-04-04 Pavel Podivilov <podivilov@chromium.org>
3118 Reviewed by Yury Semikhatsky.
3120 Web Inspector: search in resources panel is broken.
3121 https://bugs.webkit.org/show_bug.cgi?id=57631
3123 Search in resources panel should trigger source frame content load.
3125 * inspector/front-end/Panel.js:
3126 (WebInspector.Panel.prototype.jumpToNextSearchResult):
3127 (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
3128 * inspector/front-end/ResourcesPanel.js:
3129 * inspector/front-end/SearchController.js:
3130 (WebInspector.SearchController.prototype.handleShortcut):
3131 (WebInspector.SearchController.prototype.focusSearchField):
3132 * inspector/front-end/SourceFrame.js:
3133 (WebInspector.SourceFrame.prototype.show):
3134 (WebInspector.SourceFrame.prototype._ensureContentLoaded):
3135 (WebInspector.SourceFrame.prototype.performSearch):
3137 2011-04-03 Eric Seidel <eric@webkit.org>
3139 Reviewed by Ryosuke Niwa.
3141 Split out UnicodeBidi enum into its own header (to allow use in platform)
3142 https://bugs.webkit.org/show_bug.cgi?id=57722
3144 unicode-bidi is a CSS concept. However the same concept is really needed throughout
3145 the bidi code in platform as well. So I'm moving the enum to platform.
3146 The only part of the enum which doesn't make much sense to platform/ is "normal".
3148 * WebCore.xcodeproj/project.pbxproj:
3149 * css/CSSPrimitiveValueMappings.h:
3150 * platform/text/UnicodeBidi.h: Added.
3151 * rendering/style/RenderStyle.h:
3152 * rendering/style/RenderStyleConstants.h:
3154 2011-04-04 Andrey Adaikin <aandrey@google.com>
3156 Reviewed by Yury Semikhatsky.
3158 Web Inspector: Highlighted search tokens would not be shown on long lines in the text viewer
3159 https://bugs.webkit.org/show_bug.cgi?id=57749
3161 * inspector/front-end/TextViewer.js:
3162 (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
3163 (WebInspector.TextEditorMainPanel.prototype._paintLine):
3165 2011-04-04 Alexander Pavlov <apavlov@chromium.org>
3167 Reviewed by Yury Semikhatsky.
3169 Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s
3170 https://bugs.webkit.org/show_bug.cgi?id=48525
3172 * inspector/front-end/Resource.js:
3173 (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
3175 2011-04-01 Alexander Pavlov <apavlov@chromium.org>
3177 Reviewed by Yury Semikhatsky.
3179 Web Inspector: appropriateSelectorForNode() invokes the "localName" getter on DOMNode rather than function
3180 https://bugs.webkit.org/show_bug.cgi?id=57632
3182 Moved the affected method onto the DOMNode.prototype as "appropriateSelectorFor".
3184 * inspector/front-end/DOMAgent.js:
3185 (WebInspector.DOMNode.prototype.appropriateSelectorFor):
3186 * inspector/front-end/EventListenersSidebarPane.js:
3188 * inspector/front-end/StylesSidebarPane.js:
3189 (WebInspector.StylesSidebarPane.prototype.addBlankSection):
3190 * inspector/front-end/utilities.js:
3192 2011-04-04 Andrey Kosyakov <caseq@chromium.org>
3194 Unreviewed. Followup to an incomplete commit in r82806.
3196 * inspector/front-end/ExtensionAPI.js:
3197 (WebInspector.injectedExtensionAPI.PanelWithSidebarImpl.prototype.createSidebarPane):
3198 (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl):
3199 (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setHeight):
3200 (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
3201 (WebInspector.injectedExtensionAPI):
3202 * inspector/front-end/ExtensionPanel.js:
3203 (WebInspector.ExtensionSidebarPane):
3204 (WebInspector.ExtensionSidebarPane.prototype.setPage):
3205 (WebInspector.ExtensionSidebarPane.prototype._setObject):
3206 * inspector/front-end/ExtensionServer.js:
3207 (WebInspector.ExtensionServer):
3208 (WebInspector.ExtensionServer.prototype.notifyExtensionSidebarUpdated):
3209 (WebInspector.ExtensionServer.prototype._onCreatePanel):
3210 (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
3211 (WebInspector.ExtensionServer.prototype.createClientIframe):
3212 (WebInspector.ExtensionServer.prototype._onSetSidebarContent):
3214 2011-04-04 Yury Semikhatsky <yurys@chromium.org>
3216 Unreviewed. Fix Qt minimal build.
3218 * inspector/InspectorFrontendChannel.h:
3220 2011-04-01 Sergey Vorobyev <sergeyvorobyev@google.com>
3222 Reviewed by Yury Semikhatsky.
3224 Web Inspector: Separate sendMessageToFrontend function
3225 from InspectorClient to individual interface.
3226 https://bugs.webkit.org/show_bug.cgi?id=57548
3228 Refactoring - covered with existing inspector tests.
3232 * WebCore.vcproj/WebCore.vcproj:
3233 * WebCore.xcodeproj/project.pbxproj:
3234 * inspector/CodeGeneratorInspector.pm:
3235 * inspector/InspectorClient.h:
3236 * inspector/InspectorFrontendChannel.h: Added.
3237 (WebCore::InspectorFrontendChannel::~InspectorFrontendChannel):
3239 2011-04-04 Nico Weber <thakis@chromium.org>
3241 Reviewed by Eric Seidel.
3243 Prefer a using directive over qualified names in LocalizedNumberICU.cpp
3244 https://bugs.webkit.org/show_bug.cgi?id=57742
3246 Requested by ap in https://bugs.webkit.org/show_bug.cgi?id=57715
3248 * platform/text/LocalizedNumberICU.cpp:
3249 (WebCore::createFormatterForCurrentLocale):
3250 (WebCore::numberFormatter):
3251 (WebCore::parseLocalizedNumber):
3252 (WebCore::formatLocalizedNumber):
3254 2011-04-04 Andrey Adaikin <aandrey@google.com>
3256 Reviewed by Yury Semikhatsky.
3258 Web Inspector: Breakpoints in the gutter stay static while editing the text
3259 https://bugs.webkit.org/show_bug.cgi?id=57616
3261 * inspector/front-end/SourceFrame.js:
3262 (WebInspector.SourceFrame):
3263 (WebInspector.SourceFrame.prototype._saveViewerState):
3264 (WebInspector.SourceFrame.prototype._restoreViewerState):
3265 (WebInspector.SourceFrame.prototype._endEditing):
3266 (WebInspector.SourceFrame.prototype._lineNumberAfterEditing):
3267 (WebInspector.SourceFrame.prototype.addBreakpoint):
3268 (WebInspector.SourceFrame.prototype.removeBreakpoint):
3269 * inspector/front-end/TextViewer.js:
3270 (WebInspector.TextViewer.prototype._syncDecorationsForLine):
3272 (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
3273 (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
3274 (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
3275 (WebInspector.TextEditorMainPanel.prototype._splitChunkOnALine):
3277 2011-04-04 Ilya Tikhonovsky <loislo@chromium.org>
3279 Reviewed by Yury Semikhatsky.
3281 Web Inspector: remove obsolete doc generating code from CodeGenerator.
3282 https://bugs.webkit.org/show_bug.cgi?id=57748
3284 * inspector/CodeGeneratorInspector.pm:
3286 2011-04-04 Andrey Kosyakov <caseq@chromium.org>
3288 Reviewed by Yury Semikhatsky.
3290 Web Inspector: [Extensions API] Merge WatchExpressionSidebarPane into ExtensionSidebarPane
3291 https://bugs.webkit.org/show_bug.cgi?id=57622
3293 Merged WatchExpressionSidebarPane into ExtensionSidebarPane, added setPage(url).
3294 Fixed wrong getter in schema (scripts -> elements)
3296 * inspector/front-end/ExtensionAPI.js:
3297 (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setObject):
3298 (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setPage):
3299 * inspector/front-end/ExtensionAPISchema.json:
3300 * inspector/front-end/ExtensionServer.js:
3301 (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
3303 2011-04-04 Ilya Tikhonovsky <loislo@chromium.org>
3305 Reviewed by Pavel Feldman.
3307 Web Inspector: introduce support of 'optional' flag for command arguments.
3308 https://bugs.webkit.org/show_bug.cgi?id=57698
3310 * inspector/CodeGeneratorInspector.pm:
3311 * inspector/Inspector.json:
3312 * inspector/InspectorDebuggerAgent.cpp:
3313 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3314 (WebCore::InspectorDebuggerAgent::setBreakpoint):
3315 (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3316 * inspector/InspectorDebuggerAgent.h:
3317 * inspector/InspectorPageAgent.cpp:
3318 (WebCore::InspectorPageAgent::reloadPage):
3319 * inspector/InspectorPageAgent.h:
3320 * inspector/InspectorResourceAgent.cpp:
3321 (WebCore::InspectorResourceAgent::getResourceContent):
3322 * inspector/InspectorResourceAgent.h:
3323 * inspector/InspectorRuntimeAgent.cpp:
3324 (WebCore::InspectorRuntimeAgent::evaluate):
3325 * inspector/InspectorRuntimeAgent.h:
3326 * inspector/generate-inspector-idl:
3328 2011-04-04 Yury Semikhatsky <yurys@chromium.org>
3330 Reviewed by Pavel Feldman.
3332 Web Inspector: InjectedScriptManager should not try to access inspected window in case of workers
3333 https://bugs.webkit.org/show_bug.cgi?id=57637
3335 * bindings/js/JSInjectedScriptManager.cpp:
3336 (WebCore::InjectedScriptManager::injectedScriptFor):
3337 * bindings/v8/custom/V8InjectedScriptManager.cpp:
3338 (WebCore::InjectedScriptManager::injectedScriptFor):
3339 * inspector/InjectedScript.cpp:
3340 (WebCore::InjectedScript::InjectedScript):
3341 (WebCore::InjectedScript::canAccessInspectedWindow):
3342 * inspector/InjectedScript.h:
3343 * inspector/InjectedScriptManager.cpp:
3344 (WebCore::InjectedScriptManager::createForPage):
3345 (WebCore::InjectedScriptManager::createForWorker):
3346 (WebCore::InjectedScriptManager::InjectedScriptManager): access check function is passed as a parameter to the constructor
3347 and it depends on which type of context we're inspecting(worker or page).
3348 (WebCore::InjectedScriptManager::canAccessInspectedWorkerContext):
3349 * inspector/InjectedScriptManager.h:
3350 * inspector/InspectorController.cpp:
3351 (WebCore::InspectorController::InspectorController):
3353 2011-04-04 Ryuan Choi <ryuan.choi@samsung.com>
3355 Reviewed by Eric Seidel.
3357 V8StringCallback.cpp requires V8Binding.h
3358 https://bugs.webkit.org/show_bug.cgi?id=57699
3360 No new tests required because of just adding header file.
3362 * bindings/scripts/CodeGeneratorV8.pm:
3364 2011-04-03 Ryuan Choi <ryuan.choi@samsung.com>
3366 Reviewed by Eric Seidel.
3368 [CMAKE] Clean duplicated files in WebCore_Sources
3369 https://bugs.webkit.org/show_bug.cgi?id=57741
3371 No new tests, Only duplicated files were removed.
3375 2011-04-03 Luke Macpherson <macpherson@chromium.org>
3377 Reviewed by Darin Adler.
3379 Fix 2-space indentation introduced in bug 54706.
3380 https://bugs.webkit.org/show_bug.cgi?id=57740
3382 No new tests - whitespace changes only.
3384 * css/CSSStyleSelector.cpp:
3385 (WebCore::CSSStyleSelector::applyProperty):
3386 Convert 2-space indentation to 4-space indentation.
3388 2011-04-03 Luke Macpherson <macpherson@chromium.org>
3390 Reviewed by Dimitri Glazkov.
3392 Make CSSStyleApplyProperty non-copyable
3393 https://bugs.webkit.org/show_bug.cgi?id=57738
3395 No new functionality added so no new tests required.
3397 * css/CSSStyleApplyProperty.h:
3398 Added WTF_MAKE_NONCOPYABLE(CSSStyleApplyProperty) to ensure singleton stays single.
3400 2011-04-03 Dan Bernstein <mitz@apple.com>
3402 Reviewed by Maciej Stachowiak.
3404 fast/images/extra-image-in-image-document.html crashes when run after embed-image.html
3405 https://bugs.webkit.org/show_bug.cgi?id=57733
3407 The crash happens because resetting the page scale as part of preparing the WebView for the
3408 next test triggered layout, which in turn caused a plug-in to make a resource request, and
3409 DumpRenderTree's delegate to be dispatched. The delegate doesn’t expect to be called between
3410 tests, and it references the layout test controller, which is null.
3413 (WebCore::Frame::scalePage): Avoid an unnecessary layout if the page scale isn’t changing. This
3414 is more efficient, and has the side effect of avoiding the crash in DumpRenderTree, although
3415 DumpRenderTree could still crash when after a test with disabled plug-ins and a non-1 page scale.
3416 I think there are currently no such tests, so I am not fixing DumpRenderTree.
3418 2011-04-03 Eric Seidel <eric@webkit.org>
3420 Reviewed by Ryosuke Niwa.
3422 Teach InlineIterator how to work from any root, not just a RenderBlock
3423 https://bugs.webkit.org/show_bug.cgi?id=57726
3425 For implementing bidi-unicode: isolate, we need to be able to run the
3426 bidi algorithm over a subtree of inlines, not just from a block root.
3427 This is the first step in making this possible.
3429 * rendering/InlineIterator.h:
3430 (WebCore::InlineIterator::InlineIterator):
3431 (WebCore::InlineIterator::root):
3432 (WebCore::bidiNext):
3433 (WebCore::bidiFirst):
3434 (WebCore::InlineIterator::increment):
3435 (WebCore::InlineBidiResolver::appendRun):
3436 * rendering/RenderBlockLineLayout.cpp:
3437 (WebCore::RenderBlock::findNextLineBreak):
3439 2011-04-03 Eric Seidel <eric@webkit.org>
3441 Reviewed by Dan Bernstein.
3443 Split out handling of trailing spaces from layoutInlineChildren
3444 https://bugs.webkit.org/show_bug.cgi?id=57432
3446 There is much more we could split out from this function, but this is a start.
3448 I suspect this is very hot code. Hopefully the compiler will do the right thing.
3449 If it doesn't the Chromium PLT bots will tell us.
3451 * rendering/RenderBlock.h:
3452 * rendering/RenderBlockLineLayout.cpp:
3453 (WebCore::RenderBlock::handleTrailingSpaces):
3454 (WebCore::RenderBlock::layoutInlineChildren):
3456 2011-03-21 Ryosuke Niwa <rniwa@webkit.org>
3458 Reviewed by Eric Seidel.
3460 editing commands shouldn't run when there's no body
3461 https://bugs.webkit.org/show_bug.cgi?id=56771
3463 The bug was caused by WebKit's not checking the existence of root editable element
3464 in enabled* functions. Although isContentEditable returns true whenever we're in design mode,
3465 we should not run editing commands in a document without a body element editable because
3466 doing so results in appending a non-body element to the document node.
3468 Fixed the bug by modifying various enabled* functions to ensure we have a root editable element.
3469 New behavior tries to match that of Firefox except StyleWithCSS, which Firefox seems to ignore
3470 when there are no body element. Since StyleWithCSS is a document's state or property, we allow
3471 execCommand('StyleWithCSS') even in a document without a body element.
3473 WebKit's and Firefox's behaviors also deviate in insert-image-with-selecting-document.html.
3474 Whereas WebKit respects selection set by script and ignores execCommand, Firefox modifies
3475 the selection when document.write("x") is ran and successfully inserts image.
3477 Thus, empty-document-delete.html and empty-document-justify-right.html both pass on Firefox
3478 while empty-document-stylewithcss.html and insert-image-with-selecting-document.html both fail.
3480 Since Internet Explorer does not allow execCommand to run under design mode properly, we could
3481 not test its behavior.
3483 Tests: editing/editability/empty-document-delete.html
3484 editing/editability/empty-document-justify-right.html
3485 editing/editability/empty-document-stylewithcss.html
3486 editing/execCommand/insert-image-with-selecting-document.html
3488 * editing/Editor.cpp:
3489 (WebCore::Editor::canEdit): Verify that the root editable element exists
3490 instead of just checking that selection endpoints are editable because
3491 selection endpoints could be document node without a body element in design mode
3492 and we don't want to consider such a document editable.
3493 (WebCore::Editor::canDelete): Ditto.
3494 * editing/EditorCommand.cpp:
3495 (WebCore::enabledInEditableText): Ditto.
3496 (WebCore::enabledInRichlyEditableText): Ditto.