1. 21 Jun, 2009 4 commits
    • levin@chromium.org's avatar
      JavaScriptCore: · 3affb89e
      levin@chromium.org authored
      2009-06-21  Drew Wilson  <atwilson@google.com>
      
              Reviewed by David Levin.
      
              <https://bugs.webkit.org/show_bug.cgi?id=25043>
              Added support for multi-threaded MessagePorts.
      
              * wtf/MessageQueue.h:
              (WTF::::appendAndCheckEmpty):
                  Added API to test whether the queue was empty before adding an element.
      
      WebCore:
      
      2009-06-21  Drew Wilson  <atwilson@google.com>
      
              Reviewed by David Levin.
      
              <https://bugs.webkit.org/show_bug.cgi?id=25043>
              Removed obsolete MessagePort.startConversation(), active and onclose APIs.
      
              Refactored MessagePortProxy into MessagePortChannel and a platform-dependent PlatformMessagePortChannel
              implementation. Modified APIs to simplify cross-process implementations by moving the messaging code
              entirely into the platform-dependent proxy.
      
              Created a thread-safe default PlatformMessagePortChannel implementation.
      
              Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how
              cross-thread MessagePorts work.
      
              * GNUMakefile.am:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
                  Added MessagePortChannel/PlatformMessagePortChannel files.
              * bindings/js/JSMessagePortCustom.cpp:
              (WebCore::JSMessagePort::mark):
                  Changed ports to not mark their entangled pair as reachable, per the spec.
              * bindings/v8/custom/V8MessagePortCustom.cpp:
              * dom/MessageChannel.cpp:
              (WebCore::MessageChannel::MessageChannel):
                  Updated to use PlatformMessagePortChannel::createChannel() to entangle the ports.
              * dom/MessagePort.cpp:
              (WebCore::MessagePort::MessagePort):
              (WebCore::MessagePort::~MessagePort):
              (WebCore::MessagePort::postMessage):
              (WebCore::MessagePort::disentangle):
              (WebCore::MessagePort::messageAvailable):
              (WebCore::MessagePort::start):
              (WebCore::MessagePort::close):
              (WebCore::MessagePort::entangle):
              (WebCore::MessagePort::contextDestroyed):
              (WebCore::MessagePort::dispatchMessages):
              (WebCore::MessagePort::setOnmessage):
              (WebCore::MessagePort::hasPendingActivity):
                  Changed these APIs to delegate to new PlatformMessagePortChannel APIs.
              * dom/MessagePort.h:
                  Renamed isQueueOpen() to started().
              * dom/MessagePort.idl:
                  Removed startConversation and onclose.
              * dom/MessagePortProxy.h: Removed.
              * dom/MessagePortChannel.cpp: Added.
              (WebCore::MessagePortChannel::EventData::create):
              (WebCore::MessagePortChannel::EventData::EventData):
              (WebCore::MessagePortChannel::~MessagePortChannel):
              * dom/MessagePortChannel.h: Added.
              (WebCore::MessagePortChannel::EventData::message):
              (WebCore::MessagePortChannel::EventData::channel):
                  Changed EventData to hold a reference to a MessagePortChannel object instead of a MessagePort to enable cross-thread messaging.
              (WebCore::MessagePortChannel::MessagePortChannel):
              (WebCore::MessagePortChannel::create):
              * dom/ScriptExecutionContext.cpp:
              (WebCore:ScriptExecutionContext::dispatchMessagePortEvents):
                  Renamed isQueueOpen() to started().
              * dom/default/PlatformMessagePortChannel.cpp: Added.
              (WebCore::MessagePortChannel::entangleIfOpen):
              (WebCore::MessagePortChannel::disentangle):
              (WebCore::MessagePortChannel::postMessageToRemote):
              (WebCore::MessagePortChannel::tryGetMessageFromRemote):
              (WebCore::MessagePortChannel::close):
              (WebCore::MessagePortChannel::isConnectedTo):
              (WebCore::MessagePortChannel::hasPendingActivity):
              (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
              (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
              (WebCore::PlatformMessagePortChannel::createChannel):
              (WebCore::PlatformMessagePortChannel::entangleIfOpen):
              (WebCore::PlatformMessagePortChannel::disentangle):
              (WebCore::PlatformMessagePortChannel::setRemotePort):
              (WebCore::PlatformMessagePortChannel::remotePort):
              (WebCore::PlatformMessagePortChannel::entangledChannel):
              (WebCore::PlatformMessagePortChannel::setEntangledChannel):
              (WebCore::PlatformMessagePortChannel::postMessageToRemote):
              (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
              (WebCore::PlatformMessagePortChannel::isConnectedTo):
              (WebCore::PlatformMessagePortChannel::close):
              (WebCore::PlatformMessagePortChannel::closeInternal):
              (WebCore::PlatformMessagePortChannel::hasPendingActivity):
              * dom/default/PlatformMessagePortChannel.h: Added.
              (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
              (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
              (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
              (WebCore::PlatformMessagePortChannel::MessagePortQueue::isEmpty):
              (WebCore::PlatformMessagePortChannel::MessagePortQueue::MessagePortQueue):
              * page/DOMWindow.cpp:
              (WebCore::PostMessageTimer::PostMessageTimer):
                  Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work.
              (WebCore::PostMessageTimer::event):
              (WebCore::DOMWindow::postMessage):
              (WebCore::DOMWindow::postMessageTimerFired):
      
      LayoutTests:
      
      2009-06-21  Drew Wilson  <atwilson@google.com>
      
              Reviewed by David Levin.
      
              <https://bugs.webkit.org/show_bug.cgi?id=25043>
              Updated MessageChannel/MessagePorts tests to reflect latest spec (close event has been removed).
              Added more tests of port cloning.
      
              * fast/events/message-channel-gc-2-expected.txt:
              * fast/events/message-channel-gc-2.html-disabled:
              * fast/events/message-channel-gc-3-expected.txt:
              * fast/events/message-channel-gc-3.html-disabled:
              * fast/events/message-channel-gc-expected.txt:
              * fast/events/message-channel-gc.html-disabled:
              * fast/events/message-port-clone-expected.txt: Added.
              * fast/events/message-port-clone.html-disabled: Added.
              * fast/events/message-port-expected.txt:
              * fast/events/message-port-no-wrapper-expected.txt: Added.
              * fast/events/message-port-onclose-expected.txt: Removed.
              * fast/events/message-port-onclose.html-disabled: Removed.
              * fast/events/message-port.html-disabled:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3affb89e
    • mitz@apple.com's avatar
      WebCore: · 0e2df434
      mitz@apple.com authored
              Reviewed by Sam Weinig.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=15383
                <rdar://problem/5682745> resize: vertical does not restrict to vertical
                resize
      
              Test: fast/css/resize-single-axis.html
      
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::resize): Ignore movement along the non-resizing
              axis.
      
      LayoutTests:
      
              Reviewed by Sam Weinig.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=15383
                <rdar://problem/5682745> resize: vertical does not restrict to vertical
                resize
      
              * fast/css/resize-single-axis-expected.txt: Added.
              * fast/css/resize-single-axis.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e2df434
    • weinig@apple.com's avatar
      WebCore: · f23f5741
      weinig@apple.com authored
      2009-06-21  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Eric Seidel
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=26578
              event.currentTarget for listener registered on window should point to the window object like in Firefox
      
              Test: fast/events/event-trace.html
      
              * dom/Node.cpp:
              (WebCore::Node::dispatchGenericEvent): Make the DOMWindow the currentTarget when events are dispatched
              to it. We previously used the document because DOMWindow was not yet an EventTarget.
      
      LayoutTests:
      
      2009-06-21  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Test for https://bugs.webkit.org/show_bug.cgi?id=26578
              event.currentTarget for listener registered on window should point to the window object like in Firefox
      
              * fast/events/event-trace-expected.txt: Added.
              * fast/events/event-trace.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f23f5741
    • mitz@apple.com's avatar
      WebCore: · c8cb8b8a
      mitz@apple.com authored
              Reviewed by Sam Weinig.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=9694
                resize value not compared
      
              Test: fast/css/resize-value-compared.html
      
              * rendering/style/StyleRareInheritedData.cpp:
              (WebCore::StyleRareInheritedData::operator==): Compare the resize
              member.
      
      LayoutTests:
      
              Reviewed by Sam Weinig.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=9694
                resize value not compared
      
              * fast/css/resize-value-compared-expected.txt: Added.
              * fast/css/resize-value-compared.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8cb8b8a
  2. 19 Jun, 2009 2 commits
    • hyatt@apple.com's avatar
      WebCore: · dbb8607a
      hyatt@apple.com authored
      2009-06-19  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Anders Carlsson.
      
              https://bugs.webkit.org/show_bug.cgi?id=26547
              
              Implement the IDL interface for HTMLDataGridColElement.
      
              * DerivedSources.cpp:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * html/HTMLAttributeNames.in:
              * html/HTMLDataGridColElement.cpp: Added.
              (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
              (WebCore::HTMLDataGridColElement::label):
              (WebCore::HTMLDataGridColElement::setLabel):
              (WebCore::HTMLDataGridColElement::type):
              (WebCore::HTMLDataGridColElement::setType):
              (WebCore::HTMLDataGridColElement::sortable):
              (WebCore::HTMLDataGridColElement::setSortable):
              (WebCore::HTMLDataGridColElement::sortDirection):
              (WebCore::HTMLDataGridColElement::setSortDirection):
              (WebCore::HTMLDataGridColElement::selected):
              (WebCore::HTMLDataGridColElement::setSelected):
              * html/HTMLDataGridColElement.h: Added.
              (WebCore::HTMLDataGridColElement::endTagRequirement):
              (WebCore::HTMLDataGridColElement::tagPriority):
              * html/HTMLDataGridColElement.idl: Added.
              * html/HTMLDataGridElement.h:
              * html/HTMLElementsAllInOne.cpp:
              * html/HTMLTagNames.in:
              * page/DOMWindow.idl:
      
      LayoutTests:
      
      2009-06-19  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Anders Carlsson.
      
              https://bugs.webkit.org/show_bug.cgi?id=26547
              
              Implement the IDL interface for HTMLDataGridColELement.
      
              * fast/dom/Window/window-properties-expected.txt:
              * fast/js/global-constructors-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dbb8607a
    • oliver@apple.com's avatar
      2009-06-18 Shinichiro Hamaji <hamaji@chromium.org> · 65f084b0
      oliver@apple.com authored
              Reviewed by Oliver Hunt.
      
              Bug 26426: Canvas: rotation of 'no-repeat' pattern is weird
              <https://bugs.webkit.org/show_bug.cgi?id=26426>
      
              Use 1<<23-1 as steps of no-repeat patterns instead of 100000000.0f.
              The original number cannot be represented by mantissa of float
              (23bit) so that it caused some error.
      
              Test: fast/canvas/image-object-in-canvas.html:
      
              * platform/graphics/cg/PatternCG.cpp:
              (WebCore::Pattern::createPlatformPattern):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65f084b0
  3. 18 Jun, 2009 4 commits
    • darin@apple.com's avatar
      JavaScriptCore: · c46cfaf6
      darin@apple.com authored
      2009-06-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Bug 26429: Make JSON.stringify non-recursive so it can handle objects
              of arbitrary complexity
              https://bugs.webkit.org/show_bug.cgi?id=26429
      
              For marking I decided not to use gcProtect, because this is inside the engine
              so it's easy enough to just do marking. And that darned gcProtect does locking!
              Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
              for that class says "FIXME: Remove all clients of this API, then remove this API."
      
              * runtime/Collector.cpp:
              (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
      
              * runtime/CommonIdentifiers.cpp:
              (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
              * runtime/CommonIdentifiers.h: Ditto.
      
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
              * runtime/JSGlobalData.h: Added firstStringifierToMark.
      
              * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
              (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
              objects to get their number and string values.
              (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
              to wrap an identifier or integer so we don't have to do any work unless we
              actually call a replacer.
              (JSC::ReplacerPropertyName::value): Added.
              (JSC::gap): Added. Helper function for the Stringifier constructor.
              (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
              The class is used to wrap an identifier or integer so we don't have to
              allocate a number or string until we actually call toJSON or a replacer.
              (JSC::PropertyNameForFunctionCall::asJSValue): Added.
              (JSC::Stringifier::Stringifier): Updated and moved out of the class
              definition. Added code to hook this into a singly linked list for marking.
              (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
              (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
              (JSC::Stringifier::stringify): Updated.
              (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
              (JSC::Stringifier::toJSON): Renamed from toJSONValue.
              (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
              Added code to use the m_holderStack to do non-recursive stringify of
              objects and arrays. This code also uses the timeout checker since in
              pathological cases it could be slow even without calling into the
              JavaScript virtual machine.
              (JSC::Stringifier::willIndent): Added.
              (JSC::Stringifier::indent): Added.
              (JSC::Stringifier::unindent): Added.
              (JSC::Stringifier::startNewLine): Added.
              (JSC::Stringifier::Holder::Holder): Added.
              (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
              function that handles the format of arrays and objects.
              (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
              of the file so the JSONObject class is not interleaved with the
              Stringifier class.
              (JSC::JSONObject::markStringifiers): Added. Calls mark.
              (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
              to compute the gap string is now a separate function.
      
              * runtime/JSONObject.h: Made everything private. Added markStringifiers.
      
      LayoutTests:
      
      2009-06-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              Bug 26429: Make JSON.stringify non-recursive so it can handle objects
              of arbitrary complexity
              https://bugs.webkit.org/show_bug.cgi?id=26429
      
              * fast/js/JSON-stringify-expected.txt: Updated.
              * fast/js/resources/JSON-stringify.js: Changed the infinite object and
              infinite array tests to instead just test something a fixed number of
              levels deep. Otherwise we end up with an infinite loop in the test,
              which would lead to the slow-script dialog in the production web browser.
              Also raised the number from 512 to 2048 since there's no fixed limit any more.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c46cfaf6
    • ojan@chromium.org's avatar
      2009-06-17 Erik Arvidsson <arv@chromium.org> · ad7e83ae
      ojan@chromium.org authored
              Reviewed by Adele Peterson.
      
              https://bugs.webkit.org/show_bug.cgi?id=15189
              Adds the HTML5 input event support for textarea.
              
              Also, moves the oninput attribute parse handling to HTMLElement so that
              it can be set on any HTML element so that bubbling events can be handled
              using HTML attribute handlers.
      
              Test: fast/forms/textarea-input-event.html
      
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::parseMappedAttribute):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::parseMappedAttribute):
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad7e83ae
    • mitz@apple.com's avatar
      WebCore: · ae136e50
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix <rdar://problem/6913221> REGRESSION (Safari 3-4): Search field on
                apple.com cuts entered text
      
              Test: fast/forms/search-vertical-alignment.html
      
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::layout): Vertically center the
                  the search field's inner block.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - test and updated result for <rdar://problem/6913221>
                REGRESSION (Safari 3-4): Search field on apple.com cuts entered text
      
              * fast/forms/search-vertical-alignment.html: Added.
              * platform/mac/fast/forms/search-vertical-alignment-expected.checksum: Added.
              * platform/mac/fast/forms/search-vertical-alignment-expected.png: Added.
              * platform/mac/fast/forms/search-vertical-alignment-expected.txt: Added.
              * platform/mac/fast/forms/search-zoomed-expected.checksum:
              * platform/mac/fast/forms/search-zoomed-expected.png:
              * platform/mac/fast/forms/search-zoomed-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae136e50
    • abarth@webkit.org's avatar
      WebCore: · 65b26d7e
      abarth@webkit.org authored
      2009-06-18  Chris Evans  <scarybeasts@gmail.com>
      
              Reviewed by Adam Barth.
      
              Fix 8-digit long hex entities. Fixes bug 26454
              https://bugs.webkit.org/show_bug.cgi?id=26454
      
              Test: fast/parser/eightdigithexentity.html
      
              * html/HTMLTokenizer.cpp: fix off-by-ones.
      
      LayoutTests:
      
      2009-06-18  Chris Evans  <scarybeasts@gmail.com>
      
              Reviewed by Adam Barth.
      
              Added test for bug 26454 (broken 8-digit hex entities).
              https://bugs.webkit.org/show_bug.cgi?id=26454
      
              * fast/parser/eightdigithexentity-expected.txt: Added.
              * fast/parser/eightdigithexentity.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65b26d7e
  4. 17 Jun, 2009 3 commits
    • barraclough@apple.com's avatar
      JavaScriptCore: · 6a347ac2
      barraclough@apple.com authored
      2009-06-17  Gavin Barraclough  <barraclough@apple.com>
      
              Reviewed by Mark Rowe.
      
              <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
      
              On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
      
              No performance impact.
      
              * jit/JITArithmetic.cpp:
              (JSC::JIT::emit_op_rshift):
      
      LayoutTests:
      
      2009-06-17  Gavin Barraclough  <barraclough@apple.com>
      
              Reviewed by Mark Rowe.
      
              Add tests to check shifts by non-constant amounts.
      
              * fast/js/kde/operators-expected.txt:
              * fast/js/kde/resources/operators.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a347ac2
    • hyatt@apple.com's avatar
      Update layout test results for addition of datagrid element. · 1dcf569e
      hyatt@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dcf569e
    • hyatt@apple.com's avatar
      WebCore: · 84a34894
      hyatt@apple.com authored
      2009-06-17  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Adam Roben and Anders Carlsson.
      
              Stub out the HTMLDataGridElement.
      
              * DerivedSources.make:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle):
              * editing/htmlediting.cpp:
              (WebCore::canHaveChildrenForEditing):
              * html/HTMLDataGridElement.h: Added.
              (WebCore::HTMLDataGridElement::HTMLDataGridElement):
              (WebCore::HTMLDataGridElement::tagPriority):
              * html/HTMLDataGridElement.idl: Added.
              * html/HTMLElement.cpp:
              (WebCore::inlineTagList):
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::isAffectedByResidualStyle):
              * html/HTMLTagNames.in:
      
      LayoutTests:
      
      2009-06-17  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Anders Carlsson.
      
              Update window properties layout test for HTMLDataGridElement addition.
      
              * fast/dom/Window/window-properties-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84a34894
  5. 14 Jun, 2009 2 commits
    • darin@apple.com's avatar
      WebCore: · 883e14cf
      darin@apple.com authored
      2009-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Bug 26364: Search can find text that's hidden by overflow:hidden
              https://bugs.webkit.org/show_bug.cgi?id=26364
              <rdar://problem/6952081>
      
              Test: fast/text/find-hidden-text.html
      
              * editing/TextIterator.cpp:
              (WebCore::BitStack::BitStack): Added.
              (WebCore::BitStack::push): Added.
              (WebCore::BitStack::pop): Added.
              (WebCore::BitStack::top): Added.
              (WebCore::BitStack::size): Added.
              (WebCore::parentOrShadowParent): Added. Helper function for walking up
              the parent node chain, crossing shadow tree boundaries.
              (WebCore::depthCrossingShadowBoundaries): Added for use in assertions.
              Counts the depth of a node using the parentOrShadowParent function.
              (WebCore::fullyClipsContents): Added. Returns true for an element that
              fully clips its contents, currently defined as a box that has zero width
              or height and hides overflow. We can add other cases here later.
              (WebCore::ignoresContainerClip): Added. Returns true for an element that
              ignores its container clip, currently defined as an element with absolute
              or fixed positioning.
              (WebCore::pushFullyClippedState): Added. Pushes a bit on the stack indicating
              if the node in question fully clips its contents.
              (WebCore::setUpFullyClippedStack): Added. Pushes a bit for each ancestor of
              a node. Used when creating an iterator.
              (WebCore::TextIterator::TextIterator): Removed code to initialize
              m_inShadowContent. Call setUpFullyClippedStack.
              (WebCore::TextIterator::advance): Use parentOrShadowParent. Call pop when moving
              up to a parent node, and also one extra time when moving to a sibling node.
              Call pushFullyClippedState when moving to a child node, or when moving to a
              sibling node after the aforementioned call to pop.
              (WebCore::TextIterator::handleTextNode): Return early if the node is fully clipped.
              (WebCore::TextIterator::handleReplacedElement): Ditto.
              (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
              Call setUpFullyClippedStack.
              (WebCore::SimplifiedBackwardsTextIterator::advance): Same changes as
              TextIterator::advance above.
      
              * editing/TextIterator.h: Added BitStack class and added m_fullyClippedStack to both
              TextIterator and SimplifiedBackwardsTextIterator. Removed unneeded m_inShadowContent.
      
      LayoutTests:
      
      2009-06-14  Darin Adler  <darin@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Bug 26364: Search can find text that's hidden by overflow:hidden
              https://bugs.webkit.org/show_bug.cgi?id=26364
              <rdar://problem/6952081>
      
              * fast/text/find-hidden-text-expected.txt: Added.
              * fast/text/find-hidden-text.html: Added.
      
              * fast/block/float/crash-replaced-display-block-expected.txt: Removed a space.
              * fast/dom/Range/acid3-surround-contents-expected.txt: Removed a blank line.
              * fast/dom/object-embed-plugin-scripting-expected.txt: Removed four spaces.
              * fast/parser/badentity-expected.txt: Removed a blank line.
              * http/tests/security/local-video-poster-from-remote-expected.txt: Removed a blank line.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      883e14cf
    • simon.fraser@apple.com's avatar
      2009-06-14 Simon Fraser <simon.fraser@apple.com> · ede368a7
      simon.fraser@apple.com authored
              Reviewed by Darin Adler
      
              https://bugs.webkit.org/show_bug.cgi?id=26362
      
              Fix an issue noted on quirksmode.com where dynamically adding siblings does not
              update :nth-child style correctly.
      
              Test: fast/css/nth-child-dynamic.html
      
              * dom/Node.h:
              Change diff() to take const RenderStyle*
              * dom/Node.cpp:
              (WebCore::Node::diff):
              When comparing styles to decide whether to detach and reattach, we
              need to look at whether the pseudoclass-related data in the style
              changed (since RenderStyle::diff doesn't check this).
      
              * rendering/style/RenderStyle.cpp:
              (WebCore::RenderStyle::getCachedPseudoStyle):
              (WebCore::RenderStyle::inheritedNotEqual):
              Make these methods const.
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::styleType):
              (WebCore::InheritedFlags::pseudoClassStateEquivalent):
              Make methods const.
              Add new method that compares the pseudoclass-related members.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ede368a7
  6. 11 Jun, 2009 2 commits
  7. 10 Jun, 2009 7 commits
  8. 09 Jun, 2009 8 commits
  9. 06 Jun, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: · 9867836e
      weinig@apple.com authored
      2009-06-06  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dan Bernstein.
      
              Fix for <rdar://problem/6930540>
              REGRESSION (r43797): Serif and fantasy font-family names are wrong in result of getComputedStyle
      
              Test: fast/css/font-family-builtins.html
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::identifierForFamily): Fix typo. Fantasy family should be
              -webkit-fantasy not, -webkit-serif.
      
      LayoutTests:
      
      2009-06-06  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Dan Bernstein.
      
              Test for <rdar://problem/6930540>
              REGRESSION (r43797): Serif and fantasy font-family names are wrong in result of getComputedStyle
      
              * fast/css/font-family-builtins-expected.txt: Added.
              * fast/css/font-family-builtins.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9867836e
  10. 04 Jun, 2009 2 commits
    • oliver@apple.com's avatar
      Bug in property caching of getters and setters. · 5a6d64af
      oliver@apple.com authored
      Reviewed by Gavin Barraclough
      
      Make sure that the transition logic accounts for getters and setters.
      If we don't we end up screwing up the transition tables so that some
      transitions will start incorrectly believing that they need to check
      for getters and setters.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a6d64af
    • hyatt@apple.com's avatar
      WebCore: · 94c51658
      hyatt@apple.com authored
      2009-06-04  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Sam Weinig.
      
              Move DOM window focus/blur out of SelectionController and into FocusController.  Make sure it
              fires on the focused frame when the page activation state changes also.  This is covered by an existing
              layout test (albeit badly).  I have modified the test to be correct.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setFocused):
              * page/FocusController.cpp:
              (WebCore::FocusController::setFocusedFrame):
              (WebCore::FocusController::setActive):
      
      WebKit/mac:
      
      2009-06-04  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Sam Weinig.
      
              Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made
              setFocusedFrame get called explicitly from become/ResignFirstResponder.  setFocusedFrame does
              the work of focusing the selection already.
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::transitionToCommittedForNewPage):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView becomeFirstResponder]):
              (-[WebHTMLView resignFirstResponder]):
              * WebView/WebView.mm:
              * WebView/WebViewInternal.h:
      
      LayoutTests:
      
      2009-06-04  David Hyatt  <hyatt@apple.com>
      
              Reviewed by Sam Weinig.
      
              Fix the Window focus test to not resign first responder, since that actually made the test
              incorrect.  An unfocused WebHTMLView's DOM window should not receive focus/blur events when the activation
              changes.
      
              Now the test just checks that a first responder WebHTMLView will actually fire focus/blur on the DOM window
              as the window gains/loses key.
      
              * fast/dom/Window/window-onFocus.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94c51658
  11. 02 Jun, 2009 5 commits
    • ap@webkit.org's avatar
      Land correct results for a test I just added (forgot to regenerate them after adding new · 3e1efd3b
      ap@webkit.org authored
              test cases).
      
              * fast/xpath/py-dom-xpath/expressions-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e1efd3b
    • eric@webkit.org's avatar
      2009-06-02 Julien Chaffraix <jchaffraix@webkit.org> · e352061a
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Bug 17167: Failures in fast/dom/Node/initial-values.html
      
              This partly solve a compatibility issue with other browsers. It will also
              make us more consistent while handling XHTML element.
      
              The issue is that when we create an XHTML element inside an HTML document
              (as it is the case when calling createElementNS), we default to the HTML
              behaviour in nodeName. As we cannot test if an HTMLElement is an XHTML
              element, our fix is to check whether it has a prefix and then default
              to XML behaviour for nodeName.
      
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::nodeName): Add a prefix check before
              returning the uppercase tagName (HTML behaviour).
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e352061a
    • ap@webkit.org's avatar
      Reviewed by Sam Weinig. · 68a5bc60
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=26133
              Adapt and import py-dom-xpath tests
      
              Tests: fast/xpath/py-dom-xpath/abbreviations.html
                     fast/xpath/py-dom-xpath/axes.html
                     fast/xpath/py-dom-xpath/data.html
                     fast/xpath/py-dom-xpath/expressions.html
                     fast/xpath/py-dom-xpath/functions.html
                     fast/xpath/py-dom-xpath/nodetests.html
                     fast/xpath/py-dom-xpath/paths.html
                     fast/xpath/py-dom-xpath/predicates.html
      
              Fix bugs found with this test suite:
              - name and local-name were incorrect for processing instructions (XPath expanded-name
              doesn't match DOM exactly);
              - name, local-name and namespace functions should crash on attribute nodes;
              - attemps to make node sets from other types were not detected as errors.
      
              No performance impact.
      
              * xml/XPathExpressionNode.h: Track type conversion errors that happen during evaluation.
              An error won't stop evaluation, but an exception will be raised afterwards. We could also
              detect conversion errors at compile time, but not if we're going to support XPath variables
              (which is unnecessary for XPathEvaluator, but will be necessary if we decide to make our own
              XSLT one day).
      
              * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): Check whether a type
              conversion exception occurred during evaluation, and raise an excpetion if it did.
      
              * xml/XPathFunctions.cpp:
              (WebCore::XPath::expandedNameLocalPart):
              (WebCore::XPath::expandedName):
              XPath name(), local-name() and namespace-uri() functions are defined in terms of expanded-name,
              which doesn't match anything available via DOM exactly. Calculate the expanded name properly.
              (WebCore::XPath::FunNamespaceURI::evaluate): This function could crash if used with an
              attribute node, because it released what was possibly the only reference to attribute node
              before using it. Changed the function to avoid such situation.
              (WebCore::XPath::FunLocalName::evaluate): Ditto. Also, used the new expandedNameLocalPart()
              to work properly with processing instruction nodes.
              (WebCore::XPath::FunName::evaluate): Ditto (using expandedName()).
              (WebCore::XPath::FunCount::evaluate): Signal an error if the argument is not a node-set
              (by using toNodeSet unconditionally, which will raise an error, and return an empty set).
      
              * xml/XPathPath.cpp: (WebCore::XPath::Filter::evaluate): Signal an error if the expression
              evaluation result is not a node-set.
      
              * xml/XPathPath.h: (WebCore::XPath::Filter::resultType): A Filter's result is actually
              always a node-set (this is not so for FilterExpr production in the spec, but is for us,
              because we don't naively map BNF productions to classes).
      
              * xml/XPathPredicate.cpp: (WebCore::XPath::Union::evaluate): Signal an error if either side
              is not a node-set.
      
              * xml/XPathStep.cpp: Removed an unnecesary include.
      
              * xml/XPathValue.cpp:
              (WebCore::XPath::Value::toNodeSet): Signal an error if conversion fails.
              (WebCore::XPath::Value::modifiableNodeSet): Ditto.
              (WebCore::XPath::Value::toNumber): Don't allow inputs that don't match XPath Number production
              (in particular, those using exponential notation).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      68a5bc60
    • weinig@apple.com's avatar
      WebCore: · c7cec228
      weinig@apple.com authored
      2009-06-01  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Brady Eidson.
      
              Part of https://bugs.webkit.org/show_bug.cgi?id=26100
              Add missing event handler properties to the DOMWindow
      
              Added oncontextmenu, oninput, and onmessage event handlers to
              the DOMWindow. Aditionally, the onloadstart, onprogress, onstalled,
              and onsuspend event handlers were implemented but not added to
              DOMWindow.idl.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::oninput):
              (WebCore::DOMWindow::setOninput):
              (WebCore::DOMWindow::onmessage):
              (WebCore::DOMWindow::setOnmessage):
              (WebCore::DOMWindow::oncontextmenu):
              (WebCore::DOMWindow::setOncontextmenu):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
      
      LayoutTests:
      
      2009-06-01  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Brady Eidson.
      
              Part of https://bugs.webkit.org/show_bug.cgi?id=26100
              Add missing event handler properties to the DOMWindow
      
              Added oncontextmenu, oninput, and onmessage event handlers to
              the DOMWindow. Aditionally, the onloadstart, onprogress, onstalled,
              and onsuspend event handlers were implemented but not added to
              DOMWindow.idl.
      
              * fast/dom/Window/window-properties-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7cec228
    • abarth@webkit.org's avatar
      Revert 44354. Test does not pass. · 5c80fb56
      abarth@webkit.org authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c80fb56